show hide text field
i have a registration form i would like to be able to show hide text field when a button is pressed so they can edit the form
i have a registration form i would like to be able to show hide text field when a button is pressed so they can edit the form
you would need to hand code javascript to accomplish this.
See this page for an example:
how-to-hide-and-show-your-div/
ive been able to get this to work
<html>
<head>
<script language="javaScript">
function showHide()
{
document.form1.text1.style.display=""; // this is for showing
return false;
}
</script>
</head>
<body>
<form name="form1">
<input type="text" name="text1" value="" style="display:none">
<input type="submit" name="submit" value="Click here!" onClick="return showHide();">
</form>
</body>
</html>
now how can i apply this to multiple input text including
a textarea
add lines for changing the style of the other form elements.
the third parameter:
document.form1.text1.style.display=""; // this is for showing
text1 in this case is the elements name, you can add other lines to refer to other elements:
document.form1.text1.style.display=""; // this is for showing
document.form1.text2.style.display=""; // this is for showing
document.form1.text3.style.display=""; // this is for showing
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.