Results 1 to 3 of 3

Thread: Using JavaScript to parse the results of another form?

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2005
    Posts
    2

    Using JavaScript to parse the results of another form?

    Hopefully I explain this in an understandable way. I want to write something that will allow me to submit to an already existing form page (that part I've got done), but what I would like to do somehow, is to parse the results of that page as soon as they have arrived.

    The form that is submitted to has server side text added to the page each time information is submitted to it. What I want to be able to do is find out what the resulting server side text that was added is.

    I can currently submit the form and have it open in a frame, but I would like to add some automated features based on the results of the submission. Is there some way to open a page into a string? Something like this:
    Code:
    var resultString = open("http://www.something.com/aform.html?userID=132");
    Or something to that effect, so that I could then parse resultString and get the data I'm looking for.

    Hope that makes sense.

    - JLaw

  2. #2

    Thread Starter
    New Member
    Join Date
    Apr 2005
    Posts
    2

    Re: Using JavaScript to parse the results of another form?

    Found something that suggested that for IE I could open the page in a hidden frame, and then access is via:

    aString = document.all(0).innerHTML;

    Haven't tested that yet, but I would also like to make it cross-browser compatible, and I don't believe that will work in netscape based browsers.

  3. #3
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246

    Re: Using JavaScript to parse the results of another form?

    From this little example you should be able to see how to do it. You put the URL into a hidden textbox, put the textbox value into a variable, and just parse it using Javascript. Look up some javascript examples on Google.

    Phreak
    Attached Files Attached Files

    Visual Studio 6, Visual Studio.NET 2005, MASM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width