homepage Welcome to WebmasterWorld Guest from 54.196.62.132
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
Forum Library, Charter, Moderators: coopster & jatar k & phranque

Perl Server Side CGI Scripting Forum

    
Help would be appreciated with FormMail....
How to get the Submit button to do three things...
2oddSox




msg:430002
 2:21 pm on Jul 28, 2003 (gmt 0)

Hi folks,

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.

2odd...

 

smokin




msg:430003
 2:49 pm on Jul 28, 2003 (gmt 0)

hi, just include the following into you cgi script:

$url = "your url";
print "Location: $url\n\n";

or check out

[hotscripts.com ]

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved