sign in | join about | help | sitemap
Connecting Tech Pros Worldwide
burg226's Avatar

Check Boxes communicating with Buttons


Question posted by: burg226 (Newbie) on August 28th, 2008 08:08 PM
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
3 Answers Posted
Dormilich's Avatar
Dormilich August 29th, 2008 12:26 AM
Expert - 596 Posts
#2: Re: Check Boxes communicating with Buttons

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...)
SAF22's Avatar
SAF22 August 29th, 2008 07:20 AM
Newbie - 6 Posts
#3: Re: Check Boxes communicating with Buttons

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

Expand|Select|Wrap|Line Numbers
  1. <form action="mailto:youremail@someplace.com" enctype="text/plain" method="post">
  2.  
  3. <label for="Email@mail.com">Email1@mail.com</label><input type="checkbox" name="Email@mail.com" /><br />
  4. <label for="Email2@mail.com">Email2@mail.com</label><input type="checkbox" name="Email2@mail.com" /><br />
  5. <label for="Email3@mail.com">Email3@mail.com</label><input type="checkbox" name="Email3@mail.com" /><br>
  6. <input type="submit" />
  7.  
  8. </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.
Dormilich's Avatar
Dormilich August 29th, 2008 09:38 AM
Expert - 596 Posts
#4: Re: Check Boxes communicating with Buttons

Quote:
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
Reply
Not the answer you were looking for? Post your question . . .
197,015 members ready to help you find a solution.
Join Bytes.com

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 197,015 network members.
Post your question now . . .
It's fast and it's free

Popular Articles

Top HTML / CSS Contributors