Hi i had php form in a page and I make the submit function using a javascript function ( some thing like protypes.js ). It is working fine in IE , Opera ... Nut doesn't in Firefox. Here is the code. Please any one help me to work in Firefox ..
function sendRequest() {
document.getElementById('mn').style.display='none';
document.getElementById('result_succ').style.display='block';
$('print').innerHTML= "Processing Please wait";
new Ajax.Request("comment.php",
{
method: 'post',
postBody: 'name='+ $F('name')+'&email='+ $F('email')+'&comments='+ $F('comments')+'&id='+ $F('id'),
onComplete: showResponse
});
}
function showResponse(req){
///alert("_"+req.responseText+"_");
var b=req.responseText;
var a= b.substring(0,2);
if(a=="ok"){
document.getElementById('mn').style.display='none';
document.getElementById('result_succ').style.display='block';
$('print').innerHTML= "Thank you for your comment";
}
else {
document.getElementById('mn').style.display='none';
document.getElementById('result_succ').style.display='block';
$('print').innerHTML= "Error !! Please Try again";
}
}
Thanks
Rajeesh