P potman100 Active Member Licensed User Longtime User Jan 8, 2014 #1 Hi Is it possible to make a call to WebViewExtras1.executeJavascript and wait for it to complete ? Thanks Potman100
Hi Is it possible to make a call to WebViewExtras1.executeJavascript and wait for it to complete ? Thanks Potman100
warwound Expert Licensed User Longtime User Jan 8, 2014 #2 Your javascript could call a JavascriptInterface method once it has completed. In effect notifying your b4a code it has executed. Martin. Upvote 0
Your javascript could call a JavascriptInterface method once it has completed. In effect notifying your b4a code it has executed. Martin.
P potman100 Active Member Licensed User Longtime User Jan 8, 2014 #3 Hi warwound Thanks for you response, but I'm not to sure how I would do that, this is what I have in the PageFiinished sub : B4X: Sub WebView1_PageFinished (Url As String) Log("Finished") WebViewExtras1.executeJavascript(WebView1,"itemlookup()") End Sub itemlookup() is a javascript function avaliable on the page, it does an async lookup and updates the page. Thanks for any help Regards Potman Upvote 0
Hi warwound Thanks for you response, but I'm not to sure how I would do that, this is what I have in the PageFiinished sub : B4X: Sub WebView1_PageFinished (Url As String) Log("Finished") WebViewExtras1.executeJavascript(WebView1,"itemlookup()") End Sub itemlookup() is a javascript function avaliable on the page, it does an async lookup and updates the page. Thanks for any help Regards Potman
P potman100 Active Member Licensed User Longtime User Jan 8, 2014 #4 Hi warwound I've added and it now seems to work ok. B4X: Sub WebView1_PageFinished (Url As String) Log("Finished") Dim Javascript As String Javascript="B4A.CallSub('Process_HTML', true, itemlookup())" WebViewExtras1.executeJavascript(WebView1, Javascript) End Sub Thanks Potman100 Upvote 0
Hi warwound I've added and it now seems to work ok. B4X: Sub WebView1_PageFinished (Url As String) Log("Finished") Dim Javascript As String Javascript="B4A.CallSub('Process_HTML', true, itemlookup())" WebViewExtras1.executeJavascript(WebView1, Javascript) End Sub Thanks Potman100