Click to See Complete Forum and Search --> : New and confused - mailto & GET issue


Psyadi
09-14-2003, 02:11 AM
Hi,

I have created a form and wish it to email the information to a set address and then proceed to the Thank you for your input page.

I have managed to get it to do one or the other but not both at same time and i just cannot figure out what i have to do. I am sure this must be the simplest thing to do but i just cant find any help on how to submit an email and go to a confirmation page.

Thanks in advance for your help!!! Gratefully received!!!

Psyadi

Khalid Ali
09-14-2003, 07:16 AM
As a matter of fact its not the simplest thing.

Here is what happens,when you submit your form and the form elements executes whats in the action attribute,the rest of the page is out of scope from that point on.Meaning you can not redirect to a thank you page using only JavaScript(you will need to use server side langauge)

Code One
09-14-2003, 12:13 PM
this.... Once you submit your form also include a redierect page within your submit button like:



<a href="ThankYouPage.htm" input type="submit" onclick="functionName();"></a>



Then inside your Thank you page add a back button like this:



<a href="#" input type="button" onclick="history.go(-1)"></a>



I think that should work, if not let me know.

Thanks

Code One

AdamBrill
09-14-2003, 01:07 PM
You would be best to do it server-side. Take a look at this: http://www.webdevfaqs.com/php.php

AdamBrill
09-14-2003, 01:08 PM
Oh, BTW, that code doesn't use mailto, since mailto is a bad idea anyway... ;)

Khalid Ali
09-14-2003, 03:51 PM
Hey Adam,
just one point.I have been under the impression for liongest time that mailto is not valid,unfortunately only to be proved wrong..:-(

mailto is a valid protocol identifier for action attribute..
I swear I read a detailed article on this saying that mailto was not valid,however, I was proven wrong, now the reason I am bringing this up again is to find out how its bad or why,so that I can make sure that this time around I am not on the wrong side of the standards..:-)

The only possible drawback for using mailto is that support for this in browser arena is a bit sketchy..

AdamBrill
09-14-2003, 04:58 PM
Originally posted by Khalid Ali
Hey Adam,
just one point.I have been under the impression for liongest time that mailto is not valid,unfortunately only to be proved wrong..:-(

mailto is a valid protocol identifier for action attribute..
I swear I read a detailed article on this saying that mailto was not valid,however, I was proven wrong, now the reason I am bringing this up again is to find out how its bad or why,so that I can make sure that this time around I am not on the wrong side of the standards..:-)

The only possible drawback for using mailto is that support for this in browser arena is a bit sketchy.. "a bit sketchy" is an understatement. ;) Here are my reasons for saying that "mailto is a bad idea anyway":

1. Mailto: is overall just a pain to get to work right. Even once you have it working on your computer, it still may mess up for the next user.

2. Mailto: won't work for any users who don't have a mail program installed(and operating). With more and more people using WebMail, this could become a serious problem.

3. I hate the message box that pops up and asks you if you are sure you want to submit the form.

4. It is extremely insecure. Although PHP isn't secure(unless you have a secure server), it is much more so than Mailto: is.

5. You can't format the e-mail that is going to be sent with mailto(at least not that I am aware of).

So, those are my reasons. It really has nothing to do with standards(although I think it is rediculous that it is valid).

When I see the MailTo: command, I inwardly groan... :p lol

Khalid Ali
09-14-2003, 05:35 PM
Originally posted by AdamBrill
"
When I see the MailTo: command, I inwardly groan... :p lol

fair enough(personal choice).
However I was totally bummed to see that this darn thing was in the list of valid protocols for URI's used in html pages (anchor tags and form elements)

AdamBrill
09-14-2003, 06:12 PM
Well, if you want to know about standards, don't talk to me. ;) I'm not really a big standard guy(at least not as much as some people). If you want standards, talk to Charles. :D lol