Renney7
01-25-2003, 10:56 AM
I need to make a feedback form for my schoolīs pages which opens in new window and doesnīt require userīs e-mail adress. Iīve 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īt 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 = 'name@domain.com';
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="Send Message">
</center>
</td>
</tr></table>
</form>
:confused:
1.) How to make a form that doesnīt 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 = 'name@domain.com';
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="Send Message">
</center>
</td>
</tr></table>
</form>
:confused: