i'm trying to get the return value of a javascript function(for example: return "hello") with iPhone SDK.
On OS X the WebView method -stringByEvaluatingJavaScriptFromString returns a NSString containing the js function return value, but on the iPhone no value is returned.
How can I solve this?
I found a private UIWebViewDelegate method
- (void)webView:(id)fp8 runJavaScriptAlertPanelWithMessage:(id)fp12 initiatedByFrame:(id)fp16
invoked when the alert() function is used in the js script. So I can get the "return" value just by calling alert(myReturValue).
That doesn't solve my problem, because I need something in the public SDK.