I have a UIWebView with a form on it. I would like to get the response from the form sent back to my application so that it can respond accordingly. Is there anyway to do this with javascript or anything?
Asked
Active
Viewed 4,515 times
1 Answers
3
Something like:
NSString *formValue1 = [webview stringByEvaluatingJavaScriptFromString:@"document.forms[0].elements[0]"];

Art Gillespie
- 8,747
- 1
- 37
- 34
-
Thanks this makes a lot of sense. I also found a similar answer here http://stackoverflow.com/questions/4585193/help-using-javascript-code-in-a-uiwebview – Chris Truman Jan 06 '11 at 23:20
-
But this is something your native Objective-C method will call. How can UIWebview pass value to Objective-C or rather how can webpage invoke Objective-C method ? – harshit2811 Jul 22 '15 at 09:53