Sunday, May 12, 2024
 Popular · Latest · Hot · Upcoming
58
rated 0 times [  63] [ 5]  / answers: 1 / hits: 22875  / 13 Years ago, fri, may 6, 2011, 12:00:00

Am developing an app which load a HTML page into uiwebview - that html file contains text-filed and drop-down list, text-boxes etc..



Here How to get values which user has entered in that text-filed and answers selected from drop-down(picker).



Thanks


More From » html

 Answers
11

You can use [UIWebView stringByEvaluatingJavascriptFromString:] method and get the values by executing the javascript.



Example:
If your html is:



<html>
<body>
<input id=myId type=text value=TextValue/>
</body>
</html>


Following code can get you the value of the text field:



   NSString* value = [webView stringByEvaluatingJavaScriptFromString:@document.getElementById('myId').value];

[#92375] Wednesday, May 4, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
emiliano

Total Points: 381
Total Questions: 109
Total Answers: 93

Location: Jersey
Member since Fri, Oct 1, 2021
3 Years ago
emiliano questions
;