Hey, I'm trying to make a way for the user to click a link in an email agent and the submit button (previously hidden by css) and it then becomes unhidden.
function showSubmit() {
var submit = document.getElementsByName("submit");
if (submit.style.display=="none"){
submit.style.display="inline";
}
}
Then the html:
Click <a href="#" onclick="showSubmit()">here</a> to display submit button.
<form action="mailscript.php" method="post" class="mailbox">
<table class="mailbox">
<tr><td>Email To:</td><td><input type="text" name="emailto" /></td></tr>
<br />
<tr><td>Subject:</td><td><input type="text" name="subject" /></td></tr>
<br />
<tr><td>Message:</td><td><input type="text" name="body" class="body"/></td></tr>
</table>
<br />
<input type="submit" value="Send Email" class="submit" name="submit"/>
</form>
And the CSS:
.submit {
visibility: hidden;
}
Thanks! This code I have does nothing, the submit button doesn't show up, nothing happens.