XMLNewbie
05-01-2003, 01:46 PM
Hi!
I am trying to write a javascript that will look at the textboxes I have on a table generated by XSL. When a user makes a change to any of textboxes and presses the submit button. I would like the changed data to be emailed to a predetermined address.
<SCRIPT>
function form_onsubmit(){
var pstrXML = new String();
// Create the new XML string
pstrXML+= '<email>\n';
pstrXML+= '<subject>' + {contact_name} + </subject>\n';
pstrXML+= '<subject>' + {contact_phone1} + </subject>\n';
pstrXML+= '<subject>' + {contact_phone2} + </subject>\n';
pstrXML+= '</email>';
// Set the string to the hidden input box
form.hiddeninput.value = pstrXML;
// Submit the form
form.submit();
}
</SCRIPT>
<FORM name="form" onsubmit="form_onsubmit();" ACTION="send.asp"
METHOD="POST">
<input type="hidden" id="hiddeninput" value=""></input>
<INPUT TYPE="SUBMIT" NAME="Submit" VALUE="Only Press Once to Send
Changes" />
</FORM>
Any ideas what I am missing?
I am trying to write a javascript that will look at the textboxes I have on a table generated by XSL. When a user makes a change to any of textboxes and presses the submit button. I would like the changed data to be emailed to a predetermined address.
<SCRIPT>
function form_onsubmit(){
var pstrXML = new String();
// Create the new XML string
pstrXML+= '<email>\n';
pstrXML+= '<subject>' + {contact_name} + </subject>\n';
pstrXML+= '<subject>' + {contact_phone1} + </subject>\n';
pstrXML+= '<subject>' + {contact_phone2} + </subject>\n';
pstrXML+= '</email>';
// Set the string to the hidden input box
form.hiddeninput.value = pstrXML;
// Submit the form
form.submit();
}
</SCRIPT>
<FORM name="form" onsubmit="form_onsubmit();" ACTION="send.asp"
METHOD="POST">
<input type="hidden" id="hiddeninput" value=""></input>
<INPUT TYPE="SUBMIT" NAME="Submit" VALUE="Only Press Once to Send
Changes" />
</FORM>
Any ideas what I am missing?