Gary Croxford
asked on
Javascript: onChange / OnMouseOver events have all stopped firing
thank you for looking at my question,
I have a php page (attached) and the javascript functionality has stopped.
the functionality is as follows
as a diagnostic I changed the OnChange event to jsAlert()
but not even that is firing. Is this something to do with the way in which javascript is implemented. Other pages in the suite with similar constructs are working.
Please help.
KLTD1000_Step14.php
Section1.php
I have a php page (attached) and the javascript functionality has stopped.
echo '<td align="center" id="lblRTD">RTD<br/>';
echo '<div class="tooltip"><input type="text" size="10" id="SpigotNoRTD" name="SpigotNoRTD" OnChange="jsHeatNoRTD()" OnMouseOver="jsMouseOverSpigotRTD()" tabindex="1"/>';
echo '<span class="tipSpigotRTD" id="tipSpigotRTD"></span>';
echo '</div>';
echo '<input type="hidden" id="SpigotRTDPONo" name="SpigotRTDPONo"/>';
echo '<input type="hidden" id="SpigotRTDDrgNo" name="SpigotRTDDrgNo"/>';
echo '<input type="hidden" id="SpigotRTDRevNo" name="SpigotRTDRevNo"/>';
echo '</td>';
the functionality is as follows
function jsHeatNoRTD(){
var HeatNoRTD = document.getElementById('SpigotNoRTD').value;
var Pipe = HeatNoRTD.indexOf("|");
var Tilda = HeatNoRTD.indexOf("~");
var Aster = HeatNoRTD.indexOf("*");
if(HeatNoRTD.length > 0){
if (Pipe > 0)){
var arrValues = HeatNoRTD.split("|");
} else if (Tilda > 0){
var arrValues = HeatNoRTD.split("~");
} else if (Aster > 0){
var arrValues = HeatNoRTD.split("*");
}
document.getElementById('SpigotNoRTD').value = arrValues[0];
document.getElementById('SpigotRTDPONo').value = arrValues[1];
document.getElementById('SpigotRTDDrgNo').value = arrValues[2];
document.getElementById('SpigotRTDRevNo').value = arrValues[3];
}
}
function jsMouseOverSpigotRTD(){
if (document.getElementById('SpigotRTDPONo').value > 0){
var SpigotRTDPONo = document.getElementById('SpigotRTDPONo').value;
var SpigotRTDDrgNo = document.getElementById('SpigotRTDDrgNo').value;
var SpigotRTDRevNo = document.getElementById('SpigotRTDRevNo').value;
var TextString = "PO: " + SpigotRTDPONo + "\nDrg: " + SpigotRTDDrgNo + "\nRev: " + SpigotRTDRevNo;
document.getElementsByClassName('tipSpigotRTD')[0].innerHTML = TextString;
}
}
the HeatNoRTD() function splits the input string around "|" or "*" or "~" character and the mouseover event displays the values in a tooltip but none of it works anymore.as a diagnostic I changed the OnChange event to jsAlert()
function jsAlert(){
alert("Bingo!");
}
but not even that is firing. Is this something to do with the way in which javascript is implemented. Other pages in the suite with similar constructs are working.
Please help.
KLTD1000_Step14.php
Section1.php
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You are welcome.
ASKER