M
Martin
I have the javascript shown below in the <head> section of a web page.
In IE, both of these functions execute properly (they are both being
triggered by the onchange event in several different inputs)
However, in FF, the 2nd function does not execute. The "toggleState"
function works but "markChange" does not. To execise this, I added
an alert('It Works!') to the 2nd function - it pops up in IE but not
in FF.
Yes, javascript is enabled in FF. Like I said, the 1st function works
ok (along with some other functions that are in page. Only the
markChange function doesn't work. And, yes, I have verified that the
function name is spelled and capitalized correctly everywhere.
Any thoughts as to what I need to look for?
Thanks.
---------------------------------------------------------------------------------------------------
<script type='text/javascript'>
function toggleState(item){
x='ONOFF'+item.name.substring(3);
if(item.className == 'on') {
item.className='off';
item.value='OFF';
document.getElementById(x).value='COFF';
} else {
item.className='on';
item.value='ON';
document.getElementById(x).value='CON';
}
}
function markChange(fldNum){
x=document.all['CHANGED'].value;
document.all['CHANGED'].value = x.substring(0,fldNum-1) +'1'+
x.substring(fldNum);
}
</script>
In IE, both of these functions execute properly (they are both being
triggered by the onchange event in several different inputs)
However, in FF, the 2nd function does not execute. The "toggleState"
function works but "markChange" does not. To execise this, I added
an alert('It Works!') to the 2nd function - it pops up in IE but not
in FF.
Yes, javascript is enabled in FF. Like I said, the 1st function works
ok (along with some other functions that are in page. Only the
markChange function doesn't work. And, yes, I have verified that the
function name is spelled and capitalized correctly everywhere.
Any thoughts as to what I need to look for?
Thanks.
---------------------------------------------------------------------------------------------------
<script type='text/javascript'>
function toggleState(item){
x='ONOFF'+item.name.substring(3);
if(item.className == 'on') {
item.className='off';
item.value='OFF';
document.getElementById(x).value='COFF';
} else {
item.className='on';
item.value='ON';
document.getElementById(x).value='CON';
}
}
function markChange(fldNum){
x=document.all['CHANGED'].value;
document.all['CHANGED'].value = x.substring(0,fldNum-1) +'1'+
x.substring(fldNum);
}
</script>