I've got a checkbox and 2 text boxes on a form. If the checkbox is checked and something is entered into either text box, I want the checkbox to be unchecked.
I've got the following function that is called by the onblur event of both text boxes.
[tt]
function ClearCheck(){
alert("Got to ClearCheck function"
;
alert("Text1=" + document.GetCriteria.Text1.value);
alert("Text2=" + document.GetCriteria.Text2.value);
if (document.GetCriteria.Text1.value!=""
{
alert("Clear Checkbox"
;
document.GetCriteria.Check1.checked=false;
}
}
[/tt]
It works when either textbox value is changed if there is a value in Text1. But I also need it to work if Text1 is blank and something is entered into Text2. I can't figure out or find example of the correct syntax for 'this condition or that condition' in the IF statement.
Can I do that in javascript, or do I need to separate IF statements? _________
Rott Paws
...It's not a bug. It's an undocumented feature!!!
I've got the following function that is called by the onblur event of both text boxes.
[tt]
function ClearCheck(){
alert("Got to ClearCheck function"
alert("Text1=" + document.GetCriteria.Text1.value);
alert("Text2=" + document.GetCriteria.Text2.value);
if (document.GetCriteria.Text1.value!=""
alert("Clear Checkbox"
document.GetCriteria.Check1.checked=false;
}
}
[/tt]
It works when either textbox value is changed if there is a value in Text1. But I also need it to work if Text1 is blank and something is entered into Text2. I can't figure out or find example of the correct syntax for 'this condition or that condition' in the IF statement.
Can I do that in javascript, or do I need to separate IF statements? _________
Rott Paws
...It's not a bug. It's an undocumented feature!!!