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
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.
1 Attachment(s)
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