On May 26, 9:47 pm, "Maps.Huge.Info (Maps API Guru)"
<[email protected]> wrote:
> This is more a JavaScript question than an Android one.
>
> It sounds to me like you could either inline the JavaScript ahead of
> the page, which would make it execute first, or add an "onload"
> function so that it executes right after the rest of the page is
> resolved. Either way should work, if I understand your question.
>
> For further reading, I suggest searching Google for basic JavaScript
> tutorials, there's lots of stuff out there.
Thanks for the reply, John. Sorry I wasn't clear.
I would like WebView to pre-execute the JavaScript without modifying
the HTML page.
Something like:
webView.loadUrl("javascript:var%20x=1");
webView.loadUrl("file:///android_asset/page.html"); // page.html will
then have x available
Except that javascript: URLs do not work properly with spaces in them:
05-26 22:13:55.412 E/Web Console( 286): SyntaxError: Parse error at
undefined:1
--
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