52
rated 0 times
[
54]
[
2]
/ answers: 1 / hits: 55286
/ 13 Years ago, tue, august 23, 2011, 12:00:00
Hi I'm having some trouble getting this to work, pretty simple all I am wanting to do is show a div once my html form is submitted.
<head>
<script type=text/javascript>
function showHide() {
var div = document.getElementById(hidden_div);
if (div.style.display == 'none') {
div.style.display = '';
}
else {
div.style.display = 'none';
}
}
</script>
</head>
<body>
<form method=post name=installer>
<label>Home Keyword</label>
<br />
<input type=text name=hello value=>
<br />
<input type=submit value= name=submit onsubmit=showHide()>
</form>
<div id=hidden_div style=display:none>
<p>Show me when form is submitted :) </p>
</div>
</body>
Any help would be much appreciated thank you :)
More From » html