View Full Version : UIWebView content

Jul 21, 2008, 12:27 AM
Hey, is there anyone who can help me a bit with web content via stringByEvaluatingJavaScriptFromString? I've not done any javascript previous to now. BUT! I have dabbled enough over the past few days to be able to fill in text to fields using this method as well as checking a checkbox. I would also like to click a "submit" button as well as return the HTML content for a page inside the UIWebView. I'm fairly certain that the submit is possible, I am less certain of the HTML gathering. Can anyone help me out or point me in the right direction?

Thanks in advance.

Jul 21, 2008, 01:26 AM
Well, it seems like cheating, but this works for submitting the form:


I never did have any luck with the submit() function.

So now I just need to figure out how to get the content back via javascript. Any takers?

Incidentally, I am thinking of writing up a class to allow for queuing a bunch of javascript calls in a web view and then waiting for the results. Would anyone else be interested in such a thing? Or is this just tricky for us non-javascript guys? =)