Retrieve Data from Mysql

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nivethikha
    New Member
    • Sep 2011
    • 1

    #1

    Retrieve Data from Mysql

    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.......
  • johny10151981
    Top Contributor
    • Jan 2010
    • 1059

    #2
    how about using jquery??

    it will be simpler to use

    Comment

    Working...