iOS Question WebView Injecting javascript code

Giuliano Cucchiarini

Member
Licensed User
Longtime User
Hi
I am trying to inject some simple javascript instruction to a WebView in B4i, but I do not succeed.

For example if I run these 2 simple instructions:

B4X:
Dim no As NativeObject = WebView1
no.RunMethod("stringByEvaluatingJavaScriptFromString:", Array("alert('Hello!');"))

I see the Alert Message box, but I cannot close it...

What's wrong with this?

Thank you for your help.
Giuliano C.
 

Giuliano Cucchiarini

Member
Licensed User
Longtime User
I am able to inject any kind of Javascript, even entire libraries and they work work well.
The only problem is the alert message box that does not close.
You may try the 2 instructions I sent you and verify...
Thank You
Giuliano C.
 
Upvote 0
Top