Welcome to WebmasterWorld Guest from 188.8.131.52
I've been banging my head on this for a couple of days now and I just can't figure it out. I'm not a coder - give me a screwdriver anyday - so I hope you can help in newbie-speak.
I have a contact page where all I require is a name, e-mail address, confirm e-mail address, and 6 numerical values of the users choice.
I need to confirm that the details in the 'e-mail addy' and the 'confirm e-mail addy' fields match before it is submitted. No problem there. I need the details to be e-mailed to me. No problem there. I need the submit button to take the user to the next page. No problem there.
But what is a problem is that I need the button to do all three things in one click. So in essence, when the user enters the details and clicks on the submit button, the details are checked (and a message alerts the user if there is incorrect info), an e-mail is sent to an address via my formmail script, and the user is taken to the next page.
I can do them all individually, but I have no idea how to call various functions from the one button.
The script that I have to check the data responds from an OnClick event from the submit button. That in turn checks the data and I can get the user to the next page by using a
window.location= 'nextpage.htm'. So that's effectively two actions in the one click - but when I do that, the OnClick function overrides the sending of the forms data to my Formmail script, and thus I don't get any data sent to me.
Does that make sense? Any ideas how I can do this?
Thanks for your time.