cbanks Active Member Licensed User Longtime User Feb 1, 2013 #1 When I use the following code, it doesn't bring up a prompt box: var name = prompt("Enter your chat name:", "Guest"); The above code is in a php page in the webbrowser.
When I use the following code, it doesn't bring up a prompt box: var name = prompt("Enter your chat name:", "Guest"); The above code is in a php page in the webbrowser.
warwound Expert Licensed User Longtime User Feb 1, 2013 #2 Use WebViewExtras to add a WebChromeClient to your WebView. Martin. Sent from my HUAWEI U8815 using Tapatalk 2 Upvote 0
Use WebViewExtras to add a WebChromeClient to your WebView. Martin. Sent from my HUAWEI U8815 using Tapatalk 2
NeoTechni Well-Known Member Licensed User Longtime User Feb 2, 2013 #3 And that lets you get around the limitation on using javascript on local files? Upvote 0
warwound Expert Licensed User Longtime User Feb 2, 2013 #4 NeoTechni said: And that lets you get around the limitation on using javascript on local files? Click to expand... There is no limit on using javascript in local files (i think). But the default WebView does not support javascript modal dialogs such as alert and prompt. To enable such dialog boxes you need to add a WebChromeClient - now when javascript calls alert and prompt methods you will see the dialog box. Martin. Upvote 0
NeoTechni said: And that lets you get around the limitation on using javascript on local files? Click to expand... There is no limit on using javascript in local files (i think). But the default WebView does not support javascript modal dialogs such as alert and prompt. To enable such dialog boxes you need to add a WebChromeClient - now when javascript calls alert and prompt methods you will see the dialog box. Martin.