In article <Jb***************@newssvr14.news.prodigy.com>,
Rick <ri*****@ccpspeople.comwrote:
>I'm trying to make an input tag visible or hidden based on the value of
another input tag, so that when the 1st input tag is changed in anyway, the
2nd input tag will become visible.
It needs javascript onKeyUp and onKeyDown methods and some CSS.
CSS: ==================================================
..hide { display: none; }
..show { display: inline; }
HTML: =================================================
<!-- this is your "sensing" input field -->
<input type="text" name="sense" value=""
onKeyDown="showhidden(this.form.sense,this.form.re veal);"
onKeyUp="showhidden(this.form.sense,this.form.reve al);" >
<!-- this is your initially-hidden input field -->
<input type="text" name="reveal" value="" class="hide">
Javascript in your HTML <headblock: ==================
<script language="JavaScript" type="text/javascript>
function showhide(fieldname,hiddenname)
{
hiddenname.className = fieldname.length ? "show" : "hide";
}
</script>
Note: I have not tested anything I wrote above. But it should get you
started.
-Alex