Hi,

The issue you are explaining is not clear. May be some more log info
[use adb logcat] would help.
I doubt there could be a html parse error in newhtml or a JS error in
the related functions. Check once.

In your case, the onJSAlert in the new WebChromeClient does not really
do anything as the method you have to override is onJsAlert [see the
typo!].
Even if it is right, you are telling WebView that you will handle the
alert dialog and WebView stop execution, which is rather contradictory
to your requirement of displaying alert boxes.

Hope I did not overlook any !

Regards
Sathish

On Mar 27, 8:21 am, kypriakos <[email protected]> wrote:
> HI all,
>
> I have been trying to solve the following issue and I am wondering if
> anyone else has
> run into a similar case:
>
> I load an html page that is associated with a set of javascript
> functions. When the user
> presses on one of the buttons a javascript function is executed and it
> generates a
> new page using:
>
> document.getElementById('parenthtml').innerHTML=newhtml;
>
> In addition a javascript alert displays a particular warning for the
> user to read using the following
> in the the webview class:
>         wv.setWebChromeClient(new WebChromeClient() {
>
>                 public boolean onJSAlert(WebView view, String url, String
> message, JsResult result)
>                 {
>                 return true;
>                 }
>         });
>
> When the page switches to the one the generated one the alerts do not
> work anymore. Is this
> normail? Since the page and its functions are generated in the same
> control as the main page I was
> expecting the alerts to work there as well.
>
> Any ideas?
>
> Thanks

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to