On Mar 14, 12:08 pm, "Evertjan." <exjxw.hannivo...@interxnl.net>
wrote:
magix wrote on 14 mrt 2007 in comp.lang.javascript:
Hi,
I want to display or hide the button.
Condition is
1. During Onload, "Update" button is Hide.
2. the drop down list must be selected, meaning SelectedIndex != 0
3. all 5 input text edit box must have value in it.
After the condition 2 and 3 are fulfilled, the Update Button will appear.
How to achieve that in javascript ? please help.
<button style='display:none;' id='b'....
if (allIsWell)
document.getElementById('b').style.display = 'block';
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Where function allIsWell might look something like:
function allIsWell() {
return (document.getElementById('mySelect').selectedIndex >= 0 &&
document.getElementById('myText1').value &&
document.getElementById('myText2').value &&
document.getElementById('myText3').value &&
document.getElementById('myText4').value &&
document.getElementById('myText5').value);
}
Replace with your actual element id's of course...