Check Boxes communicating with Buttons

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • burg226
    New Member
    • Jun 2007
    • 8

    Check Boxes communicating with Buttons

    hey all, i'm trying to make an employee directory in a Table with check boxes beside each employees email address. What i want it to do is at the bottom of the directory i want a Button to compile all of the checked check boxes and enter those email addresses in a new email document using a mailto command.

    Any ideas? I'm sure i have seen something similar done before. I would prefer to keep it in HTML if possible as i am a very junior programmer.

    Thanks for any help,

    burG
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    I think that's not possible without the help of a script language. Since HTML is about markup it can't read out the checkbox status. And the button essentially triggers a form to be executed (which is processed by a script language)
    The two possibilities I see is
    - use javascript to feed the mailto with values
    - use a sever side script to send the email (php, asp, perl...)

    Comment

    • SAF22
      New Member
      • Aug 2008
      • 6

      #3
      Just HTML, and just a mailto: action? Then just like this:

      Code:
      <form action="mailto:youremail@someplace.com" enctype="text/plain" method="post">
      
      <label for="Email@mail.com">Email1@mail.com</label><input type="checkbox" name="Email@mail.com" /><br />
      <label for="Email2@mail.com">Email2@mail.com</label><input type="checkbox" name="Email2@mail.com" /><br />
      <label for="Email3@mail.com">Email3@mail.com</label><input type="checkbox" name="Email3@mail.com" /><br>
      <input type="submit" />
      
      </form>
      It will open the users email program and only list the items that were checked.

      This will be valid in transitional style, but not in strict.

      I really recommend that you don't do it this way, mailto: is a nasty action. You also would might want to learn at least some basic JavaScript to ensure people can't send it blank.

      Comment

      • Dormilich
        Recognized Expert Expert
        • Aug 2008
        • 8694

        #4
        Originally posted by SAF22
        Just HTML, and just a mailto: action? Then just like this
        never heard of that way, at least it's good to know. though I would always use a script to send mails

        Comment

        Working...