iv managed to create a form and it works perfect in I.E…….but y wont it work in Firefox????
this is my code….any help will be much appreciated…thnkz…
Untitled Document
var myObjectReference = createRequestObject();
function createRequestObject() {
var xmlObject;
try{xmlObject=new ActiveXObject(“Msxml2.XMLHTTP”);}
catch (e){
try { xmlObject=new ActiveXObject(“Microsoft.XMLHTTP”);}
catch(f) { xmlhttp=null; }
}
if(!xmlObject&&typeof XMLHttpRequest!=”undefined”) {
xmlObject=new XMLHttpRequest();
}
return xmlObject;
}
function sendRequestTextPost() {
var rnd = Math.random();
var myvalue1 = escape(document.getElementById(“myvalue1″).value);
var myvalue2 = escape(document.getElementById(“myvalue2″).value);
try{
myObjectReference.open(‘POST’,'serverscript.php’);
myObjectReference.setRequestHeader(‘Content-Type’,'application/x-www-form-urlencoded’);
myObjectReference.onReadyStateChange = handleResponseText;
myObjectReference.send(‘myvalue1=’+myvalue1+’&myvalue2=’+myvalue2+’&rnd=’+rnd);
}
catch(e){}
finally{}
}
function handleResponseText(){
try{
if((myObjectReference.readyState == 4) && (myObjectReference.status == 200)){
var response = myObjectReference.responseText;
document.getElementById(“idforresults”).innerHTML = String(response);
}
}
catch(e){alert(“there was an error”);}
finally{}
}
MY VALUE 1:
MY VALUE 2:
——————
serverscript.php :
]]>