send form by email when checked

Discussion in 'HTML & Website Design' started by DChealth, Feb 4, 2009.

  1. #1
    This may sound weird and I don't know if it is possible but here is what I am trying to do:

    when a user checks a checkbox I want it to automatically send me an email.

    I don't want the user to have to click a submit button first. Just have them click on a checkbox and doing that will send me an email.

    Any Ideas?
     
    DChealth, Feb 4, 2009 IP
  2. Nitros

    Nitros Banned

    Messages:
    296
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You have to use " onchange" function in your form.

    Something like this:

    <SELECT name="dzien" onchange="your.form.submit();">
    ........
    </SELECT>
    Code (markup):
    with radio button looks like this:

    <INPUT type="radio" name="fodp" onclick="your.form.submit();">
    Code (markup):
     
    Nitros, Feb 4, 2009 IP
  3. Kankatee

    Kankatee Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Assuming you want the form to post back and submit the above will work fine.
    If you are looking to simply "collect" and action(such as a radio button is clicked), you may want to consider a partial post back via ajax or an update panel.
     
    Kankatee, Feb 4, 2009 IP