I need to Post data without submitting the form.
I have a form with the following
Field1
Field2
Field3
Field4
I need to post to an asp page after the first 3 fields are filled out.
I'm trying to submit the first 3 fields by using onBlur of the fourth
field.
I'm just starting in javascript and would appreciate any help.
This is what I have so far:
<SCRIPT language="javascript">
var strSchema = "urn:schemas-microsoft-com:office:office#";
window.document._ctl1.elements(strSchema + "field4").onblur =
GetCDISDetails;
function GetCDISDetails()
{
var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
var xmldoc = new ActiveXObject("Msxml2.DOMDocument");
var xmlDomNode;
var strLot = window.document._ctl1.elements(strSchema + "lot").value;
var strdate = window.document._ctl1.elements(strSchema +
"date").value;
var strcomments = window.document._ctl1.elements(strSchema +
"comments").value;
xmlhttp.Open("POST",
"http://imoprod/asp_scripts/include/CDIS.asp?Lot="+strLot+"&date="+strdate+"&comments" +strcomments,false);
xmlhttp.Send(xmldoc);
xmldoc.load(xmlhttp.responseXML);
}
</SCRIPT>