I suppose the easiest method would be with Ajax (XMLHttp to access the...), PHP (the MySQL functions, to mess with the database), MySQL (well its the DB) I don't know how ( or if its possible) to connect to a DB with Ajax. Try checking them out, a combination of them wouldn't be hard. The form could be:
Code:
<input type="text" name="rebatepart1" onChange="check();">
Then the Ajax would be something like:
Code:
if (window.XMLHttpRequest)
{
xmlhttp=new XMLHttpRequest();
}
else
if (window.ActiveXObject)
{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
function RSchange() {
if (xmlhttp.readyState==1) {
document.getElementById('contentdiv').innerHTML="Loading..."
}
else if (xmlhttp.readyState==4) {
document.getElementById('contentdiv').innerHTML=xmlhttp.responseText
}
}
function check() {
var data="rebatepart1=" + rebatepart1;
var rebatepart1=getElementByName("rebatepart1");
if (xmlhttp) {
d=document
xmlhttp.open("POST", "somephp.php", true);
xmlhttp.onreadystatechange=RSchange
xmlhttp.send(data)
}
}
The PHP and DB are up to you. Let me know if you need help,
Tim
Bookmarks