hi i have dynamically created textboxes using javascript in table format. actually what i want is if enter id of a student in one text box then remaining details of that student should be retrieve in other textboxes on onkeyup. for this i have used a simple ajax function. but it shows Runtime error in IE7.
This is that code:
function showUser(str)
{
if (str=="")
{
document.getEle mentById("dis") .innerHTML="";
return;
}
if (window.XMLHttp Request)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest( );
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject(" Microsoft.XMLHT TP");
}
xmlhttp.onready statechange=fun ction()
{
if (xmlhttp.readyS tate == 4 && xmlhttp.status == 200)
{
document.getEle mentById("dis") .innerHTML = xmlhttp.respons eText;
}
}
xmlhttp.open("G ET","new_2g.php ?q="+str,true) ;
xmlhttp.send();
}
Can any one help me.......
This is that code:
function showUser(str)
{
if (str=="")
{
document.getEle mentById("dis") .innerHTML="";
return;
}
if (window.XMLHttp Request)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest( );
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject(" Microsoft.XMLHT TP");
}
xmlhttp.onready statechange=fun ction()
{
if (xmlhttp.readyS tate == 4 && xmlhttp.status == 200)
{
document.getEle mentById("dis") .innerHTML = xmlhttp.respons eText;
}
}
xmlhttp.open("G ET","new_2g.php ?q="+str,true) ;
xmlhttp.send();
}
Can any one help me.......
Comment