Can we open an ios WebView page from HTML5 using javascript?
I have to redirect to the native ios page from the javascript code on a button click. Is this possible?
I have gone through some links as mentioned below,
How to open a native iOS app from a web app
http://blog.grio.com/2012/07/uiwebview-javascript-to-objective-c-communication.html
But, am not pretty clear with the solutions.
Please help me with your answers and with some proper links.
As you are able to receive/send messages from and to JS. I hope you have UIWebView is added as subview in one of your viewController's view(self.view). Pass the Java script message to your ViewContoller do action here. take for an example you want to present you do it from here.
Related
I was hoping that someone could answer me a question, I don't need any code but more a helpful direction to start researching.
Here is my situation
I have a windows Form program that if I placed a button control on and a web browser control on. The web browser will have a page in it that is mostly javascript driven..now lets say thru javascipt on the web page I created a checkbox control on the webpage. Is there any way I could get my button control on my windows form to check that box? Im sorry if I am not explaining myself right still getting used to the lingo.
Thanks in advance guys
This site is a wealth of knowledge.
I assume you have WebBrowser control. Handle it's DocumentCompleted event and start you work here. Now you can work with WebBrowser.Document, WebBrowser.Document.Body to interact with your page.
For example, you can use wb.Document.InvokeScript with some parameters to handle the updates.
Or you can go directly
wb.Document.GetElementById("your_Element_ID").SetAttribute("checked", "checked")
I do have an extension (developed by me). It works fine. However I can't get the idea on how to launch extension from regular button on a web-page.
The main action (opens Chrome Popup) is performed when I click on extension icon.
But I also need to be able to launch extension via button click on website.
Should I send a msg to extension from website via javascript or?
Or I can go in a different way, and insert content from extension popup to website placeholder. A bit awkward working with extensions.
Any advice appreciated.
Thank you.
Unfortunately, it's not possible. But from the looks of it, it may be available soon.
Check out this answer in this thread.
i've developed and app in windows platform for windows phone 8.1(javascript), now am face a bug which is creating a big issue, the template i used in developing the app was navigation app, so i used page control to navigate easily, the bug i have is once i enter a page which contains form, and doing all stuffs.... its ok, but the thing is when i navigate back to previous page and enter again the FORM GOES INACTIVE, anything request is not responding, but when i close that app and reopen it, it works, please help me on this issue. awaiting for helpfull answers. thanks in advance
Check if you are using CacheMode.Required or something that keeps your page loaded - in this case method OnNavigatedTo will be called only once.
I was using all the JavaScript in the same html, but in Windows it all has to be given in ready function(page control) even if it is a jQuery code.
I tried with different options for automatically making a page full screen using javascript
I tried with the window.open("index.html","","fullscreen=yes,location=no, cursor=none");
I tried with the Native FullScreen JavaScript API- It only works on a button click or any other events , but I need to make the page automatically open on fullscreen.
...I need to make the page automatically open on fullscreen
You can't, and for good reason. That's why the fullscreen API (and window.open, typically) only works in response to a user event. It's by design to prevent web pages from hijacking the user's workspace.
This has a lot to do with my previous question:
detecting UIWebView with Javascript
I would like to force a link on my webpage to be opened with iPhones actual Safari Browser, and not in a UIWebView window, even if the app it's being viewed in tried to open all links in a UIWebView window to prevent users from going out of it.
Please note that this is not a duplicate as I'm trying to do this with Javascript/Client-side, not within my own native app (I own the page that's being viewed, but can't control which app is used to view it).
I do not think this is possible. I set up one of my apps to use a UIWebView only and never open Sarfari (though admittedly I allowed only pages within a certain domain).