Hi I am developing an online admission website for my project....I hv a table in php page with 2 columns(student id, student name)...when some1 clicks on any row, then the detail information of that student should be retrieved from mysql table n result should be displayed in the form of table....I am not getting such code from anywhere.....how can i do this with help of javascript? how to embed javascript in php?....Plz can any1 help me as soon as possible?.
kiransadani
0
Newbie Poster
Recommended Answers
Jump to PostYou can use Ajax to get all informations of the student
var xmlhttp function showDetails(str) { if (str.length==0) { document.getElementById("results").innerHTML=""; return; } xmlhttp=GetXmlHttpObject(); if (xmlhttp==null) { alert ("Your browser does not support XMLHTTP!"); return; } var url="getResults.php"; url=url+"?q="+str; url=url+"&sid="+Math.random(); xmlhttp.onreadystatechange=stateChanged; xmlhttp.open("GET",url,true); xmlhttp.send(null); } …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.