jquery problem in IE working fine in FF
Posted
by Bharanikumar
on Stack Overflow
See other posts from Stack Overflow
or by Bharanikumar
Published on 2010-06-01T06:12:54Z
Indexed on
2010/06/01
6:13 UTC
Read the original article
Hit count: 194
jQuery
|jquery-ajax
function populate_customer_details(){
$.ajax({
type : 'POST',
url : 'populate_customer_details.php',
data: {
email : $('#txt_email_id').val()
},
success : function(data){
if(data=="NOROWSFOUND"){
alert("Sorry, Email ID not exist in our database");
document.getElementById("txt_email_id").focus();
}else{
var val = explode_all_into_arr(data,"|=|");
document.getElementById("FirstName").value = val[0];
document.getElementById("LastName").value = val[1];
document.getElementById("mobilecountrycode").value = parseInt(val[2]);
document.getElementById("MobileNo").value = val[3];
document.getElementById("homecountrycode").value = parseInt(val[4]);
document.getElementById("HomeNo").value = val[5];
document.getElementById("PaxEmail").value = val[6];
document.getElementById("PaxEmailConf").value = val[6];
}
},
});
}
This is my snippet purpose is getting the customer details and populate into textfield and combo box ,
That is
Firstname will append into Firstname text field ,
Secondname will append into Secondname text field ,
Same like mobilecountrycode (but this is dropdown combo),
Some time combo selectedindex work fine, but some time not selecting the value ,
I am not sure what s problem in that...
Nothing works in IE ,
Also showing object expected error in IE ,
i have ajax_common.js : in this i added above script ,
in the page top first i included the jquery.js , Then i include ajax_common.js file,
But no idea why this problem.
Regards
(NOTE i included the jquery.js )
,
© Stack Overflow or respective owner