friends, plz post how to get a randam text from database by javascript. Whats the function to call?
Javascript function...late me know
Started on the old forum in September 2012 · view the original in the archive · old links redirect here
u mean like using AJAX????
I'm Proud to be a Sri Lankan!
Javascript is client side scripting - meaning that all scripts are run on your browser and not on the server
you can use XMLHttpRequest to to get data:
var xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET", "http://somesite.con", false);
xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
xmlhttp.send(null);
var respon = xmlhttp.responseText;
alert(respon);
but you will still need php/mysql to handle your database query or some other scripting language