UIWebView content

Discussion in 'iPhone/iPad Programming' started by slycrel, Jul 20, 2008.

  1. macrumors newbie

    Joined:
    Jul 11, 2008
    #1
    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.
     
  2. thread starter macrumors newbie

    Joined:
    Jul 11, 2008
    #2
    Well, it seems like cheating, but this works for submitting the form:

    document.getElementById('Button1').click();

    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? =)
     

Share This Page