Posting Data

G

Gino

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:eek:ffice:eek:ffice#";
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>
 
E

Erwin Moller

Gino,

ActiveX objects?
Posting without the prior knowledge of the user?

Yes, I know how to do it, but please tell us why you want this behaviour
first.

Regards,
Erwin Moller
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,141
Latest member
BlissKeto
Top