Click to See Complete Forum and Search --> : Form problem


Wasiu0607
01-02-2004, 10:42 PM
Hi, I found a form script and edited it a bit but it doesnt work. It says the script is inoperational. Can anyone tell me whats wrong? Thanks

<FORM method="POST" action="mailto:idkking@yahoo.ca" onSubmit="alert('Mail is being sent');">
<b>Personal Information:</b><br>
Enter Your Name: <input NAME="name" size="20"><br>*Enter your first and last name<br>
Enter Your E-mail Address: <input NAME="name" size="20"><br>*If you are paying via Paypal, enter the e-mail address which you use for Paypal<br>
Enter Your Phone Number: <input NAME="name" size="12"><br>*Enter your phone number including the area code (ex. xxx-xxx-xxxx)<br>
<b>Address</b>
City: <input NAME="name" size="10"><br>
Province: <input NAME="name" size="19"><br>
Postal Code: <input NAME="name" size="10"><br>
<SELECT name="Country" size=1>
<OPTION selected value="Canada">Canada
</SELECT><p>
<input type=submit onBlur="doVerify()" value="Submit!">
<input type=reset value="Reset">

<SCRIPT LANGUAGE="javascript">

function doVerify()
{
location.href = "http://www.freewebs.com/idkking/main.html"
}
</script>

</form> :rolleyes:

Pittimann
01-03-2004, 03:53 AM
Hi!

Several problems: all your text inputs are having the same name; the alert in your onsubmit is unnecessary because the browser will alert the user, that a program is trying to send a mail; your doVerify() function doesn't verify anything.

In addition, your script tag is lacking the type attribute...

Cheers - Pit

Wasiu0607
01-03-2004, 01:06 PM
Could you please fix it for me? I don't even understand the script.. I got the script from the website.:confused: Thanks a lot

Pittimann
01-03-2004, 09:45 PM
Hi!

You should make a tiny little bit more clear, what you actually need. You say, you got the script from the website. My chances to guess from which among billions of websites you got it are not really high (even though in this case it is not that important).

I don't know what fields you really need, I don't know which fields you want to validate and I ask myself why you put a select there with only one option (Canada). There's nothing to say against only dealing with Canadian users or customers but in such a case you can leave that out... What shall be the action to be done on submit of the form and where do the data have to go???

Maybe if you specify what you want, you will find further assistance here...

Cheers - Pit

Wasiu0607
01-04-2004, 03:48 PM
Well I only want to make a simple form so that when the guy clicks on submit, there will be an email sent to me with all those information he filled out. I guess the Canada selection isn't necesssary, so I will delete it afterwards. I basically copied the original codes from http://www.free-javascripts.com/ in the forms section and added some codes that I got from other website as well.

Anyways, I kind of wanted the code to have
Name
E-Mail
------------------------
Address
and a box about 12 rows that the buyer can enter whatever they would like to buy in there.

Hope that is clear enough. Thanks again