so i’m trying to put a form emailer on my website, but i don’t want banner ads from a [i]free[URL=javascript.internet.com/]http://javascript.internet.com/
perhaps unsurprisingly, it doesn’t seem to be working…
what i want it to do is email me the details, only allow the ‘website’ field to be unfilled and not allow multiple submissions. for now. i didn’t know what if anything the Script Size: bit at the bottom was for exactly, but seeing as i’d modified the original form a fair bit concluded that it must have changed. so i deleted it. is this a necessary bit of code & if so, how can i work out what it [i]should
Here it is for your amusement:
[CODE]<html>
<head>
<script language=”JavaScript”>
<!– This script and many more are available free online at –>
<!– The JavaScript Source!! http://javascript.internet.com –>
<!– Begin
var submitcount=0;
function reset() {
document.form.name.value=””;
document.form.email.value=””;
document.form.organisation.value=””;
document.form.name.value=””;
document.emailform.comments.value=””;
}
function checkFields() {
missinginfo = “”;
if (document.form.name.value == “”) {
missinginfo += “n – Name”;
}
if ((document.form.from.value == “”) ||
(document.form.from.value.indexOf(‘@’) == -1) ||
(document.form.from.value.indexOf(‘.’) == -1)) {
missinginfo += “n – Email address”;
if (document.form.organisation.value == “”) {
missinginfo += “n – Organisation”;
}
if(document.form.comments.value == “”) {
missinginfo += “n – Comments”;
}
if (missinginfo != “”) {
missinginfo =”_____________________________n” +
“You failed to correctly fill in your:n” +
missinginfo + “n_____________________________” +
“nPlease re-enter and submit again!”;
alert(missinginfo);
return false;
}
else
{
if (submitcount == 0)
{
submitcount++;
return true;
}
else
{
alert(“This form has already been submitted. Thanks!”);
return false;
}
}
}
// End –>
</script>
<title>w_a_accessform.html</title>
</head>
<body style=”background-color: rgb(0, 0, 0); color: rgb(0, 0, 0);”
alink=”#ee0000″ link=”#0000ee” vlink=”#551a8b”>
<form
style=”font-family: times new roman,times,serif; background-color: rgb(0, 0, 0);”
name=”form” onsubmit=”return checkFields();”> <input name=”to”
value=”[email protected]” type=”hidden”><input name=”subject”
value=”Password Application” type=”hidden”> <span
style=”color: rgb(204, 0, 0);”></span>
<h1 style=”text-align: center;”><small><span
style=”color: rgb(204, 0, 0);”>Please complete this form for a
password to access sample chapters & work in progress.</span></small></h1>
<h2 style=”text-align: center;”><small><small><small><span
style=”color: rgb(204, 0, 0);”>N.B. All fields are required except
“Web Site”</span></small></small></small><br>
</h2>
<span style=”color: rgb(204, 0, 0);”>
Name:
</span> <input name=”name” size=”30″
type=”text”><br>
<br>
<span style=”color: rgb(204, 0, 0);”> E-mail:</span>
<input name=”from” size=”30″
type=”text”><br>
<br>
<span style=”color: rgb(204, 0, 0);”> Organisation:
</span><input name=”organisation” size=”30″ type=”text”><br>
<br>
<span style=”color: rgb(204, 0, 0);”>Web Site:</span>
<input name=”website” value=”http://” size=”30″
type=”text”><br>
<br>
<a><span style=”color: rgb(204, 0, 0);”> Why do you
want access to my work in progress?</span></a><br>
<br>
<select name=”reason”>
<option selected=”selected”>I am/work for a Literary Agent & may
be interested in representing your work. </option>
<option>I am/work for a Publisher & may be interested in
publishing your work. </option>
<option>I am interested in obtaining a Copywrite License for your
work. </option>
<option>I wish to use your work as the basis for another type of
creative activity, but cannot afford to pay you right now. </option>
<option>I just want to read your work for free! </option>
</select>
<br>
<br>
<span style=”color: rgb(204, 0, 0);”> Comments:</span>
<br>
<br>
<textarea rows=”10″ cols=”90″ name=”comments”></textarea><br>
<br>
<input name=”submit” value=”Submit Form!”
type=”submit”> <input
value=” Cancel ” type=”reset”> <br>
<br>
</form>
<center
style=”font-family: times new roman,times,serif; background-color: rgb(0, 0, 0);”>
<font size=”-2″><span style=”color: rgb(204, 0, 0);”>Free JavaScripts
provided</span><br style=”color: rgb(204, 0, 0);”>
<span style=”color: rgb(204, 0, 0);”>by</span> <a
href=”http://javascriptsource.com”>The JavaScript Source</a></font>
</center>
</body>
</html>
it currently resides at: [URL=http://www.hostunlim.com/woodyamble/w_a_accessform.html]HostUnlim
i am using mozilla 1.7.12 on mac os 10.1.3 and will be more than happy to plaster links to webdeveloper.com over all the pages of the finished site, assuming i get it working! thanx in advance, especially if you’ve just trawled through that lot (i didn’t know what might be relevant), woody.