...

View Full Version : two actions? or advice how to do smarter?



fangfoo
06-17-2008, 11:13 PM
So a friend wants to know when someone unsubscribes from his email list. I help with his web design but don't know much about JS. Is there a way to use onsubmit to parse the input box for validation AND >>send an email to him with the value in the input box?

I found some solid parsing examples and have that bit working but can't figure out how to chain a second event to the form submission.

Thanks!

tomws
06-18-2008, 03:40 AM
Emailing should be done server-side by the form handler. As far as I know, there isn't a way to email via straight javascript - and even if there were, it would be far from the best option. So, assuming that you don't want to get into AJAX (and you probably don't for something this simple), your process becomes a standard form submission to a handler script.

fangfoo
06-18-2008, 04:53 PM
Ok, the ISP runs the mail list so we can't do that but I get what you are saying. Maybe I will tinker with a hidden field variable that can copy the input data and run a second action to get around the limitation. I'll post if I cobble something together that works. I appreciate the help.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum