August 14, 200917 yr Hi, I currently have got a script from the interweb which retrieves data from a MySQL database using php, but does it via Javascript. See it here. Heres the bit of script that im focussing on: function showUser(str) { xmlhttp=GetXmlHttpObject(); if (xmlhttp==null) { alert ("Browser does not support HTTP Request"); return; } var url="inc/MostPopular.php"; url=url+"?q="+str; url=url+"&sid="+Math.random(); xmlhttp.onreadystatechange=stateChanged; xmlhttp.open("GET",url,true); xmlhttp.send(null); } Currently it will only load data from the mysql database when the state of a drop-down box is changed. How do i get that script to fire when the function is called? Thanks in advance.
Create an account or sign in to comment