View Full Version : Submitting forms / Sending E-Mail
Zuperfly
09-20-2006, 08:54 AM
I've managed to display layers via the YUI panels, but I'm having some trouble with the YUI Dialog:
I'd like to use the YUI Dialog to display a form. On klicking 'submit' the form should be sent to an e-mail adress. Displaying the form is no problem (same configuration as the panels), but how do I set up the form's recipient? Do I have to send the form to a separate file for further processing or can I handle the 'mailing' inside the main file itself?
Maybe there are any tutorials or examples on sending mails using the YUI? Thanks!
Animal
09-20-2006, 09:10 AM
You're barking up the wrong tree. You need to learn about web development.
Forms are submitted to a server which can process HTTP (google it) messages.
You'll need to write a servlet, some PHP, or whatever .NET has to process the form, and send the email.
I'd recommend using Tomcat, Java, and the Javamail API.
Zuperfly
09-20-2006, 09:27 AM
You're barking up the wrong tree. You need to learn about web development.
Well, thanks.
Forms are submitted to a server which can process HTTP (google it) messages. You'll need to write a servlet, some PHP, or whatever .NET has to process the form, and send the email.
Yes, and that's what I'm asking for. With the YUI Dialog, it's possible to submit the form asynchronously (Dynamic XmlHttpRequest), so it's possible to process the form 'inside' the layer in which it is displayed. But I don't know (or where) to specify the recipients adress when I want to send the form via e-mail (and get a confirmation message displayed inside the layer after the mail has been sent).
I'd recommend using Tomcat, Java, and the Javamail API.
Isn't this far too much only for submitting a form? :wink:[/quote]
Zuperfly
09-20-2006, 12:01 PM
So for now I've managed to send the form via e-mail by using
{form name="dlgForm" method="POST" action="<php>"}
On submit, the page is sent to itself, the form is processed and the e-mail is sent.
Unfortunately, the YUI dialog layer containing the form is hidden immediately on submit. On submit, I'd like keep the layer and want to display a short feedback message for the user (like "Your mail has been send. Click here to close this window.") instead of the form. Is this possible with the YUI extensions?
jack.slocum
09-20-2006, 04:43 PM
Zuperfly,
Try the link below. They are better at these types of questions:
http://tech.groups.yahoo.com/group/ydn-javascript/
Jack
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.