Form Mailto With List Of Names Using Checkboxes?
Dec 8, 2009
I found a script on this forum that does almost what I want from this thread: [URL]. Instead of a dropdown, I'd like to have a list of names using check boxes, so that you have the option to send an email to one or all of the people. When you choose your selections and click submit, an outlook email will pop up with your selections in the to: field.
Here's the solution using a drop down, this works (and works well), but doesn't quite do what I need :
<form name="Contact_Us" id="contact" method="post" enctype="text/plain" onsubmit = "getEml()">
<fieldset id="selection">
Who would you would like to email:
<select name = "sel">
<option value="email1@email.com" >email 1</option>
<option value="email2@email.com" >email 2</option>
<option value="email3@email.com" >email 3</option>
</select>
<input type = "submit" value = "Submit the form">
</form>
<script type = "text/javascript">
function getEml() {
var emailaddress = document.Contact_Us.sel.value;
window.location = "mailto:" + emailaddress;
}
</script>
Is there a way to use checkboxes but to do the same thing?
<INPUT TYPE=CHECKBOX NAME="name1@email.com">name 1<BR>
<INPUT TYPE=CHECKBOX NAME="name2@email.com">name 2<BR>
<INPUT TYPE=CHECKBOX NAME="name3@email.com">name 3<BR>
View 2 Replies
ADVERTISEMENT
Dec 8, 2009
I have created this form. I would like to use javascript to mail the form to the selected email from the selection list when the submit button is pressed.
<form name="Contact Us" id="contact" action="mailto:" method="post">
<fieldset id="selection">
Who would you like to email:
<select>
<option value="email1" >email1</option>
<option value="email2" >email2</option>
<option value="email3">email3</option>
</select>
<fieldset id="Name" >
Name
<input type="text" id="firstname" name="firstname">
E-mail
<input type="text" id="email" name="email">
</fieldset>
<fieldset id="question">
Comments and Questions
<input type="text" id="comment" name="comment" style="width: 500; height: 300">
</fieldset>
</form>
View 4 Replies
View Related
May 20, 2010
I am planning on using the maito form with Javascript. I have a form and it is structured in the following fashion:
<form>
<b>Subject </b> <input type="text" name="subject" size="30"><br>
<b>Person 1 <b><input type="checkbox" name="email" value="person1@email.com"><br>
<b>Person 2 <b><input type="checkbox" name="email" value="person2@email.com"><br>
<b>Person 3 <b><input type="checkbox" name="email" value="person3@email.com"><br>
<input type="submit" onclick="submit">
</form>
What I am trying to do with Javascript is that you fill out the subject name and then you select which recipients of email you want to receive the email. So if I select Checkbox 1 and Checkbox 3 then when I click submit, it opens my Outlook and the To is filled in with person1@email.com;person2@email.com. So I guess I would need the javascript to populate and <href mailto: form after checking which names are checked and then populating the mailto with the variable that contains the list of names I chose. Right now we have a clunky method using the mailto but I don't have the option of choosing who it mails to so when I send it, I send the mail to everyone, even those on vacation.
View 1 Replies
View Related
May 22, 2009
Long story short, I need a button that when clicked selects all of my check boxes. The entire form is check boxes.
The catch is that they all have different names, and altering them isn't an option at this point (too much other code depends on it).
Example:
Code:
<form name="myForm" action="processing.php" method="post">
<input type="checkbox" name="arandomname" />
<input type="checkbox" name="adifferentname" />
<input type="checkbox" name="unrelatednamehere" />
[Code]....
Also, I was hoping to find a way to make the "check all" button become the "uncheck all" button if all things are already checked (and vice versa), but I won't push my luck.
I wasn't sure if this should be considered Javascript or HTML since I'm not really sure where the solution lies.
View 10 Replies
View Related
Nov 21, 2010
I have a form with several types of checkboxes, and I'm trying to check all but one of them to determine if any of those have been checked. I do not want to check 'all', but I want to see if any of the 'check_' or 'check2_' checkboxes have been checked. There are a variable number of checkboxes, so this is just an example with two of each. Set 1 and Set 2 will always have the same number of checkboxes as each other, though.
[Code]...
View 4 Replies
View Related
Jun 25, 2003
Is it possible using javascript to bring up the default mail package or bring up a web form in the event you did not have an email package on your machine?
View 2 Replies
View Related
Jul 11, 2011
I'm not aware of JS-Scripting, so I used phpform.org to create a contact form for my website. Now they give me the download link, but without the opportunity to send the data put in via mail (senseless demo-stuff). Now I count on you to find the area where to add the code for sending (all) the data to an emailadress. Here is the whole form in a zip file: [URL]
View 2 Replies
View Related
Oct 5, 2011
Attached is the code. It does open the email but does not send any information.
<!-- Table 2 for the Content -->
<form name="orders" onsubmit="return confirmSubmit()" onreset="return window.confirm('Are you sure you want to reset your Orders.'); " action="mailto:lynette@sayorkies.co.za" method="post" enctype="text/plain">
// Function to Confirm certain conditions and confirm to proceed with order
function confirmSubmit() {
var itemsOrdered = true;
if (document.forms[2].totalExcl.value == 0 || document.forms[2]delivery.value == 0) {
itemsOrdered = false;
}
if(itemsOrdered != true) {
window.alert("You have not chosen any products to purchase or No Delivery Option selected.");
return false;
}
var submitOrder = window.confirm("Are you sure you want to place the order?");
if(submitOrder == true)
return true;
return false;
}
// Function to calculate order value
function calculateValue(orders) {
var orderValue = 0; .....
View 3 Replies
View Related
Feb 24, 2011
In attempting to modify a script of a menu, that I wanted to add the ability to have sub menus, I first wanted to find out if an ordered list element, contained a secondary unordered list and what their names are so I could out put the items to the console.
Here is the test list:
<div class="nav-wrap">
<ul class="group" id="example-one">
<li class="current_page_item"><a href="#">Home</a></li>
[code]....
View 4 Replies
View Related
Jul 17, 2011
I have a form where I ask my users for a comma seperated web site list. I want to make sure this list only contains the host names of URLs without any white spaces
Original list: [url], [url], [url],[url]
Edited list: [url],[url],[url],[url]
Currently I have the following to get the comma separated list
var list = document.getElementById( "list" ).value ;
View 1 Replies
View Related
Jun 16, 2010
I have a form that i wish the entered fields to be emailed to 2 addresses; my address (bcc) and the email address that the user has entered in the email field on the form. Before you say it, I know that 'mailto' is not a recommended method but it the only one I can use (due to restrictions at work). Below is the code I am using but it doesn't seem to like [document.forms.request.email.value]. I know it works (including the validation) when I just enter an email address in the code but it doesn't using the email form field.
<FORM NAME='request'
ACTION="mailto:[document.forms.request.email.value]?subject=Room Request&bcc=katymorgan@morleycollege.ac.uk"
enctype="text/plain"
METHOD= "POST" TARGET="_blank"
onSubmit="return validateForm(request)">
View 6 Replies
View Related
Nov 17, 2010
I'm trying to move a list of names from a textbox (jim;bill;sam;cathy;) to a listbox. My code so will move the name to listbox but all one line. I need the list the names in the listbox so that can click them one at a time. Please see my code. How can I modify it to fill the list one name per line?I don't want remove any names from the listbox till I click the "OK" button and overwrite what is in the textbox.
View 11 Replies
View Related
Mar 23, 2007
mailto protocol and Notes v6.5.5 which duplicates the address in the To: field (not a valid email address) and/or posts form data in the To:, cc, or Subject: field rather than in the body of the email where it belongs. I created an entire site relying on the mailto: protocol to submit requests. (Can't use either server side apps or cgi email. Don't ask - it's a long and rediculous story.) Anyway, then we got the new release of Notes and the whole thing has been rendered useless for request submissions.
Is it possible to write a script that will duplicate the mailto: form action and keep it client side? Big hurdle is that it has to pull info from all types of form elements, just like the mailto: protocol does with email clients that actually support it properly.
View 4 Replies
View Related
Jul 17, 2011
I have a form where I ask my users for a comma seperated web site list. I want to make sure this list only contains the host names of URLs without any white spaces
Original list: [url], [url], [url],[url]
Edited list:[url],[url],[url],[url]
Currently I have the following to get the comma separated list
Code:
var list = document.getElementById( "list" ).value ;
View 3 Replies
View Related
May 14, 2010
I would like to get a list of the checked CheckBoxes in the div below, when the button is clicked.[code]...
View 3 Replies
View Related
Feb 8, 2010
I currently am trying to make a long list of checkboxes function like a multi-select box would. I would like to be able to shift-select two checkboxes and have for example, the X number of boxes in between all be selected.
View 1 Replies
View Related
Nov 15, 2011
I have a site that has dynamically generated forms with multiple submit buttons. My forms are like this, created using PHP and inserts different user names on the same page:
[Code]....
The member name goes into the JavaScript to variable: member. The Problem: is when this JS tries to submit the form called "john" for example, it searches for a form called "member" instead and it fails. Is there any way to fix this? I'm sure there is a way to deal with this kind of issue but I don't know it yet.
View 1 Replies
View Related
Jun 1, 2011
I want to detect if a checkbox is checked inside each item of a list element. If it is, I want to hide both the checkbox and the div text.
[Code]...
View 3 Replies
View Related
May 31, 2006
I'm trying to build an online form which has different recipients. So i'd be something like: Weather user select any of the optiions (where multiple recipients are) depending on that selection that's where the output will go to an specific email address.
View 1 Replies
View Related
Jul 20, 2005
Is their a way of iterating thru each tag within a form and returning the
value given in the id property, by that I mean the below html would return
the values idBoxOne, idBoxTwo, idBoxThree from the FormXX form.
<form name="FormXX" method="post" action="default.htm">
<input id="idBoxOne" name="bxOne" type="text">
<input id="idBoxTwo" name="bxTwo" type="text">
<input id="idBoxThree" name="bxThree" type="text">
</form>
Up to this point I've only used JavaScript to change CSS properties,
innerHTML and outerHTML so I'm rather new to the game.
View 3 Replies
View Related
Mar 2, 2011
I'm having a problem with the page at http://www.bathfringe.co.uk/contributors2011_2.php
The user is able to add new performances to the form. This functionality is provided by cloning elementsPart of the code should add a 'counter' array key to the names of the cloned form inputs (full code obviously available at the page linked above):
Code:
counter++;
// Find the element to be copied
[code]....
View 2 Replies
View Related
Oct 3, 2010
I have 2 questons.
1) Is there a way for the loop counter to loop while less then [a php variable]?
2) Is there a way to use a counter in the name of the form elements? Example, instead of "switchBox1" use: "switchBoxCounter" instead of "nameaddy1" use: "nameaddyCounter"
if(document.form1.switchBox1.checked)
{
document.form1.nameaddy1.style.backgroundColor = "#E5E5E5";
}
[Code]....
View 1 Replies
View Related
Sep 13, 2011
I've got about 40 check-boxes on my 1 form. These check-boxes all have names (obviously) but they are NOT all unique names. The number of UNIQUE names on my form is probably around 8 or 9 (the actual number is NOT important). Because some check-boxes use the same names as other. It's set up this way, please don't ask me to change it, I can't change it.What's the syntax/method for looping through all the names? I was thinking I should do maybe a "for" loop;
for (var i = 0; i < fieldName.length; i++)
But I don't know how to hold a variable of the unique names to start with.
View 14 Replies
View Related
Dec 14, 2011
I have a php file with an almost-standard html form. The not-so-standard part is that the name-attributes of the form elements are dynamically generated as such:
<? for($i=0; $i<5; $i++) { ?>
<input type="text" name="field_<? echo $i; ?>" />
<? } ?>
Now I want to do some javascript validation on the fields, but I'm having a bit of trouble accessing the values of the fields. My current code is as follows:
[Code]...
View 1 Replies
View Related
Dec 23, 2010
I have hashmap i.e. collection ,my code is as follows
Code:
<%! private HashMap<Integer, Domain>domainmap; %>
<%
[code]....
View 2 Replies
View Related
Oct 5, 2001
I am having difficulty using javascript to validate form fields with whitespaces in the element names (ex: First Name, Last Name).
here's a code snippet:
###
function validate(formObj) {
if (document.form1.Payment Method.checked){
do something here...}
###
the problem is that javascript won't read the element "Payment Method" unless i mash the name into one word. (i don't want to do that because i later use the element names to provide a printable customer receipt
i tried using the ascii octal number for a whitespace in the above code (...form1.Payment40Method.checked...), but to no avail.
View 2 Replies
View Related