superfly404
Technical User
I have a very simple form on my page (below)
<form name="form1" method="post" action="">
From
<input name="textfield" type="text" size="3" maxlength="3">
To
<input name="textfield" type="text" size="3" maxlength="3">
<br>
<br>
<input type="submit" name="Submit" value="Submit">
</form>
Is there a way to setup a javascript that will pull data from an XML file based on what was entered in the form, and then render the data from the XML file back into the page?
For example:
If you entered in the From: filed "ABC" and in the To: field "XYZ" - I'd like for the javascript to return from the xml data below from an xml file hosted on the same server.
<PAIR FROM="ABC" TO="XYZ" DEFINE="ABC TO XYZ">
<DATE="October 15, 2005" ON="Monday"></DATE>
<DATE="October 21, 2005" ON="THURSDAY"></DATE>
</PAIR>
And render it back into the page like this:
From: ABC to XYZ
October 15, 2005 - Monday
October 21, 2005 - Thursday
<form name="form1" method="post" action="">
From
<input name="textfield" type="text" size="3" maxlength="3">
To
<input name="textfield" type="text" size="3" maxlength="3">
<br>
<br>
<input type="submit" name="Submit" value="Submit">
</form>
Is there a way to setup a javascript that will pull data from an XML file based on what was entered in the form, and then render the data from the XML file back into the page?
For example:
If you entered in the From: filed "ABC" and in the To: field "XYZ" - I'd like for the javascript to return from the xml data below from an xml file hosted on the same server.
<PAIR FROM="ABC" TO="XYZ" DEFINE="ABC TO XYZ">
<DATE="October 15, 2005" ON="Monday"></DATE>
<DATE="October 21, 2005" ON="THURSDAY"></DATE>
</PAIR>
And render it back into the page like this:
From: ABC to XYZ
October 15, 2005 - Monday
October 21, 2005 - Thursday