i just want to know, wat is rnd982g?? and why its is being used here ?
]]>regards,
san
I had to fix few errors on your javascript file before i could put this to any use. You did a great job on posting the form to any php file and also the few validations. I have enhanced it so you can display results where you want on a page…
The new html tag to post the form would be:
please check the new javascript file…..
var req = createXMLHttpRequest();
function createXMLHttpRequest() {
var ua;
if(window.XMLHttpRequest) {
try {
ua = new XMLHttpRequest();
} catch(e) {
ua = false;
}
} else if(window.ActiveXObject) {
try {
ua = new ActiveXObject(“Microsoft.XMLHTTP”);
} catch(e) {
ua = false;
}
}
return ua;
}
var resultsPlace=”";
function sendRequest(frm, file, place) {
var rnd982g = Math.random();
var str = “”;
str=getForm(frm);
if(str) {
req.open(‘GET’, file+’?'+str+’&rnd982g=’+rnd982g);
resultsPlace = place;
req.onreadystatechange = handleResponse;
req.send(null);
}
return false;
}
function handleResponse() {
if(req.readyState == 4){
var response = req.responseText;
document.getElementById(resultsPlace).innerHTML = response;
}
}
function getForm(fobj) {
var str = “”;
var ft = “”;
var fv = “”;
var fn = “”;
var els = “”;
for(var i = 0;i