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
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...)
Just HTML, and just a mailto: action? Then just like this:
-
<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.
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
|
|
|
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.
Top HTML / CSS Contributors
|