Okay so how do I tell this to take the row index into account
function showSTD(str)
{
if (str=="")
{
document.getElementById("txtHint").innerHTML="";
return;
}
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
if(xmlhttp.readyState == 4 || xmlhttp.readyState == 'complete')
{
showSST(str);
}
}
}
xmlhttp.open("GET","AJ_PartSTD.php?q="+str,true);
xmlhttp.send();
}
function showSST(str)
{
if (str=="")
{
document.getElementById("txtHint2").innerHTML="";
return;
}
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("txtHint2").innerHTML=xmlhttp.responseText;
}
}
xmlhttp.open("GET","AJ_PartSST.php?q="+str,true);
xmlhttp.send();
}
Because it works on my inputs in my first row only
ECHO "<TR><TD WIDTH='" . $STD_ColWidth . "' style='border-left: solid #000000 1px; border-bottom: solid #000000 1px; text-align:center; background-color:#E0E0E0'><div id='txtHint' style='font-family:Tahoma,Arial,Helvetica,Geneva,sans-serif; font-size:small; text-align:center; color:#616161;'> </div></TD>\n";
ECHO "<TD WIDTH='" . $SST_ColWidth . "' style='border-left: solid #000000 1px; border-bottom: solid #000000 1px; text-align:center; background-color:#E0E0E0'><div id='txtHint2' style='font-family:Tahoma,Arial,Helvetica,Geneva,sans-serif; font-size:small; text-align:center; color:#616161;'> </div></TD>\n";
ECHO "<TD WIDTH='" . $NAV_PN_ColWidth . "' style='border-left: solid #000000 1px; border-bottom: solid #000000 1px; text-align:center;'><input name='nav_pn' type='text' value='".$RowNAV_PN."' size='12' style='font-family:Tahoma,Arial,Helvetica,Geneva,sans-serif; font-size:small; text-align:center; border: 0 none;' onchange='showSTD(this.value)' onblur='this.value=this.value.toUpperCase()'/></TD>\n";