#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2011
    Posts
    60
    Rep Power
    4

    Cfmail based on buttonclick


    Hi guys,

    i want to know how can send a form by email by hitting button.
    in other term, is there a way to call a cfmail tag in the button Onclick event for example ?

    thank you guys
  2. #2
  3. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,273
    Rep Power
    968
    Not directly, since CFML is executed on the server and JavaScript is executed on the client. But you can either just submit the form to the server and process it there, or you can have the button click trigger an AJAX call to the server. But either way, the data has to get to the server for CF to do anything with it.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2011
    Posts
    60
    Rep Power
    4
    I see kitlesss,
    thanks


    Originally Posted by kiteless
    Not directly, since CFML is executed on the server and JavaScript is executed on the client. But you can either just submit the form to the server and process it there, or you can have the button click trigger an AJAX call to the server. But either way, the data has to get to the server for CF to do anything with it.

IMN logo majestic logo threadwatch logo seochat tools logo