I need to make a feedback form for my school磗 pages which opens in new window and doesn磘 require user磗 e-mail adress. I磛e already figured out how to open a new window and the text and adresses are also ready.
1.) How to make a form that doesn磘 require user to reveal his e-mail adress? Is that even possible? Does simply removing the correct lines help?
2.) Does the window close automatically when you press the submit button? If not, how to do this?
Here is the code:
<script name="JavaScript">
<!-- Copyright 2000 by William Bontrager
function SendEmail()
{
var toaddy = <!-- e --><a href="mailto:'[email protected]">'[email protected]</a><!-- e -->';
var subject = 'JS Form Submission';
var mailer = 'mailto:' + toaddy + '?subject=' + subject + '&body=' +
'Email%20is\n\t' + document.jsform.email.value +
'\n\n' +
'Message:\n\n' + document.jsform.message.value +
'\n\n';
parent.location = mailer;
} // -->
</script>
<form name="jsform">
<table><tr>
<td align="right">Email:</td>
<td><input name="email" size="27"></td>
</tr><tr>
<td colspan="2">
Your message:<br>
<textarea name="message" cols="31" rows="6" wrap="soft">
</textarea>
<center>
<p>
<input type="submit" onClick="SendEmail()" value=http://www.webdeveloper.com/forum/archive/index.php/"Send Message">
</center>
</td>
</tr></table>
</form>
1.) How to make a form that doesn磘 require user to reveal his e-mail adress? Is that even possible? Does simply removing the correct lines help?
2.) Does the window close automatically when you press the submit button? If not, how to do this?
Here is the code:
<script name="JavaScript">
<!-- Copyright 2000 by William Bontrager
function SendEmail()
{
var toaddy = <!-- e --><a href="mailto:'[email protected]">'[email protected]</a><!-- e -->';
var subject = 'JS Form Submission';
var mailer = 'mailto:' + toaddy + '?subject=' + subject + '&body=' +
'Email%20is\n\t' + document.jsform.email.value +
'\n\n' +
'Message:\n\n' + document.jsform.message.value +
'\n\n';
parent.location = mailer;
} // -->
</script>
<form name="jsform">
<table><tr>
<td align="right">Email:</td>
<td><input name="email" size="27"></td>
</tr><tr>
<td colspan="2">
Your message:<br>
<textarea name="message" cols="31" rows="6" wrap="soft">
</textarea>
<center>
<p>
<input type="submit" onClick="SendEmail()" value=http://www.webdeveloper.com/forum/archive/index.php/"Send Message">
</center>
</td>
</tr></table>
</form>