
Need help with script to show a hidden text box if a check box is checked
Don't know how "cross browser compatible" this is, but it's at least IE4+...
<form name="myform" ...>
<input type="text" name="mytext" style="display:none">
...
</form>
In code,
document.myform.mytext.style.display = "inline"; // shows
document.myform.mytext.style.display = "none"; // hides
There's also ...style.visiblity property that works a little differently...
style Object
http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/obj...
--
Michael Harris
Microsoft.MVP.Scripting
--
Please do not email questions - post them to the newsgroup instead.
--
Quote:
> Hi
> I am new to java script and am having major trouble with this. I am looking
> to hide a text box until the viewer places a check in the check box. Any
> help would be greatly appreciated.