Hello everyone,
I am trying to submit my form with AJAX POST request and stuck with two errors which i am seeing in firefox

Error: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: http://h/php/validate.js :: handleHttpResponse :: line 85" data: no]
Source File: h/php/validate.js
Line: 85

line 85: if(http.status == 200)

Error: uncaught exception: [Exception... "Component returned failure code: 0x804b000f [nsIXMLHttpRequest.setRequestHeader]" nsresult: "0x804b000f (<unknown>)" location: "JS frame :: http://h/php/validate.js :: validateMe :: line 64" data: no]

line 64: http.setRequestHeader("Content-type","application/x-www-form-urlencoded");

i think in ajax this is a correct syntax but still it throws these error !!

Can i make ajax request like below
for (var iCounter=0; iCounter<form.length; iCounter++)
alert("calling validateme for "+document.form1.elements[iCounter]);

if that alert i will hide it will submit the form even if it is not validated and if i kept this alert it will show the proper message and prompt user to input the correct fields.

Anybody any idea???????

Thanks & Regards,