David Orriss Jr wrote:
> I need to call a JavaScript function in a page in a webkit view and
> get a return value.
> 
> Possible?  Suggestions?

I don't think you can get a result directly from calling 
loadUrl("javascript:yourfunctionhere()") on a WebView.

However, you *could*:

1. Add a callback via addJavascriptInterface()

2. Have your Javascript function call that callback with your result

3. Call the Javascript function as described above

On the plus side, this probably works. On the minus side, it requires a 
change, or at least a wrapper, for the Javascript function to use the 
callback.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com

Android Training on the Ranch! -- Mar 16-20, 2009
http://www.bignerdranch.com/schedule.shtml

--~--~---------~--~----~------------~-------~--~----~
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