Forum Moderators: open
for ($i = 0; $i < $limit; $i++)
{
$UserID = mssql_result($result,$i,"UserID");
<a href="delete.php?UID='.$UserID.'" onclick=" ConfirmChoice(); return false;"><img src="icons/trashcan.gif" border=0 alt="Delete" title="Delete"></a>
}
function ConfirmChoice(UID)
var UID = document.getElementById("UID").value;
getUrlVars()
{
answer = confirm("Are Sure You Want to delete?")if (answer !=0)
{
location = "delete.php?UID="+ UID;
}
i really get hard time to debug my java script and like php you can determine the value if empty or not by just echo $var ,'--'; statement.. but in JavaScript even if you document.write(UIDval); it doesn't show an error parse..
what is the best editor or tool for debuging javascript and DOm.. dave? tnx :bow:
alert( UIDval ); // annoying if to many or to often
document.write // avoid this
debugDiv.innerHTML += "some msg"; // writes to div at say bottom of page
make sure preferences set to "show javascript errors"
DebugBar installed in IE
script debugger installed in IE (installed by default in latest ? )
Also jsLint tool integrated into say notepad++ editor is handy to detect errors prior to debugging.