Hi; I had an onchange event calling a function perfectly this morning. I changed something, but can't remember what, and now it's broken. This is the code: tr><td><div id="HexCForm"><form name="HexCalc"> Select: <select id="Selection" onchange="Checking()"> <option>*</option> <option value="SourceName">SourceName</option> <option value="DestName">DestName</option> </select><br> <div id="HCFSearch"> </div> </td></tr></form> Code (markup): The Checking function is just a document.write to check. There is an AJAX call to a PHP script that is normally in place
Hi; Weird....here is the scripts portion of my page. Initially (the bit that worked was LoadHexForm(str) ) <script type="text/javascript" > function FullCLog() { xmlhttp=new XMLHttpRequest(); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("GoBtn").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","fullquery.php",true); xmlhttp.send(); } function HexQuery() { xmlhttp.onreadystatechange=function() document.write('Start'); stop() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("HexButton").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","hexquery.php?q="+chkd,true); xmlhttp.send(); document.write("HexQuery Ends") } function Checking() { document.write("Checking Hit") } } function GetHex(str) { xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("HexVals").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","gethex.php?q="+str,true); xmlhttp.send(); } function LoadHexForm(str) { xmlhttp=new XMLHttpRequest(); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("HCFSearch").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","loadlist.php?q="+str,true); xmlhttp.send(); } </script> Code (markup): The complete section the bit that's not working is in is: <table border="1" cellpadding="1" cellspacing="1" align="center"> <tr><td><center><b>Unit Search and Hex Mask Calculator</b></center></td></tr> <tr><td><div id="HexCForm"><form name="HexCalc"> Select: <select id="Selection" onchange="Checking()"> <option>*</option> <option value="SourceName">SourceName</option> <option value="DestName">DestName</option> </select><br> <div id="HCFSearch"> </div> </td></tr></form> Code (markup): Thanks for looking at this
You still didn't post the code for the function named Checking. onchange="Checking()" says that there is a function with that name, and that's what runs when Selection gets changed.
Hi; Its there, buried in the script tags... but here it is broken out. function Checking() { document.write("Checking Hit") } Code (markup):