Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jun 2008
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    two actions? or advice how to do smarter?

    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!

  • #2
    Senior Coder tomws's Avatar
    Join Date
    Nov 2007
    Location
    Arkansas
    Posts
    2,644
    Thanks
    29
    Thanked 330 Times in 326 Posts
    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.

  • Users who have thanked tomws for this post:

    fangfoo (06-18-2008)

  • #3
    New to the CF scene
    Join Date
    Jun 2008
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •