Creating An Online Form With Dynamic "mailto"
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
ADVERTISEMENT
Jan 1, 2011
I run a website for a skittle league and am looking to create a form to allow teams to sumbit results on line. I'm not an expert on Javascript, the code I've created so far allows the user to enter the player name and score for one team and calcutate the total. However, I'm having problems duplicating this for a second team, and would like to remove the Get Total button (i.e. Auto Calculate total).
The Code I have so far is
<html>
<head>
<script type="text/javascript" language="javascript">
function getTotalH1(oForm){
var field, i = 0, total = 0, els = oForm.elements;
var fieldnames = ['PSH1' , 'PSH2' , 'PSH3' , 'PSH4' , 'PSH5'];
for (i; i < fieldnames.length; ++i){
field = els[fieldnames[i]];
if (field.value != '' && isNaN(field.value))
{
alert('Please enter a valid number here.')
field.focus();
field.select();
return ''; .....
View 20 Replies
View Related
Feb 15, 2012
I am looking for creating a grid/table that is editable online. I have browsed online for solutions, but I am short of time & I seem to getting more confused the more I search.
Basically I am trying to create a staff rota that the admin staff can edit online and save out so it is viewable - but not editable by staff members.
View 1 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
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
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
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
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
Mar 26, 2009
I've got a couple of online self-assessment forms on my site.They go as follows:
// total score
var total = 0;
// number of questions
[code]....
View 7 Replies
View Related
Oct 24, 2009
i want to make a form. the form will have three text fields and with two buttons. what i want with this form is when the user enters the first three fields and if he wants to add more then he will click on add more button and on the same page three more fields will appear below the first three fields. the user will then enter these three fields then if he wants to add more then he will click on add more button. so three more fields will appear below the first six fields. user will enter these fields. he will be allowed to enter upto eight or less than eight times. once he finishes with this then he will click the second button to insert this data into db.
View 5 Replies
View Related
Jul 23, 2005
Am having difficulty creating a dynamic <select> element using direct
assignment to the element's option array (ie. someElement.option[i]=new
Option(someText, someValue);)
that will work on Palm devices runing Blazer 3.0 or Web Browser 2.0.
The browsers SEEM to be JavaScript1.1+ capable and the script that I
have works on every desktop-based browser, but not the PDA ones....
Any advice? Or is this a known deficiency?
View 3 Replies
View Related
Feb 3, 2011
I'm trying to create a webpage where users can click on a dynamically generated set of questions:
<?php do { ?>
<p><?php echo $row_rsQuestions['question_text']; ?><?php echo $row_rsQuestions['question_type']; ?></p>
<?php } while ($row_rsQuestions = mysql_fetch_assoc($rsQuestions)); ?>
and by clicking on a particular question, there will be an update for their particular listing of personal questions in a MySql database. I know how to create the database update part, but I think that I would need to javascript to:
1) tell my page that it's time to update (i.e. add a particular question as soon as they click it)
2) pass along the correct variable to the database update portion of the page.
View 2 Replies
View Related
Jul 29, 2009
I read a lot of things now about creating elements with $("<div/>")and the appendTo method.here is my code I'm trying to get to work:
<html>
<head>
<title>Foobar</title>
[code]....
View 1 Replies
View Related
Sep 8, 2010
I have a php script that lists some items which can be checked or unchecked. Now, I am trying to make a javascript that writes a comment field in a certain "span" - comm_'.$i.', where $i starts from 0 - if the check box is already checked (info retrieved from the database) or if the user checks the check box (when the user unchecks the check box the comment field should disappear). The problem is that I am unable to make it work properly (when I check or uncheck a box it doesn't work at all), I mean it only works for the element above, so if box_1 is checked it can only create the comment field in comm_0.
(Part of the) PHP code:
Code:
//Listing the items
<span class="olistr">
<span class="olistc" id="op">
<input type="checkbox" name="box_'.$i.'" " '.($row['state'] == 0?'checked':'').' onClick=javascript:ckState(this,"comm_","Comment",'.$i.')>
</span>
</span> .....
The error I get is - this is similar to the errors I get when checking and unchecking a check box:
Message: 'null' is null or not an object
Line: 64 (this would be line comSpc.innerHTML = 'something1';)
Char: 4
Code: 0
View 1 Replies
View Related
Feb 14, 2009
I'm trying to do the following thing. Create a dynamic selectboxA0 when a button is pushed. Then, when a value is selected in this selectboxA0, there will be dynamically generated another selectboxB0 with content which is different for each option of the first selectboxA0. When the button is pressed another time SelectboxA1 is generated (which will in his turn generate SelecboxB1).
The code I use is the following:
function addProduct(){
var url = "includes/php/catalog/loadcategories.php";
$.post(url,
function(data){
$('<tr id="catalogid'+invoiceProducts+'"><td>Product-categorie</td><td><select name="category'+invoiceProducts+'" id ="category'+invoiceProducts+'">'+data+'</select></td></tr>').appendTo('#invoiceTable');
$("#category"+invoiceProducts).change(
function(){
var currentCatalogField = $("#category"+invoiceProducts).attr("name");
if($('#product'+invoiceProducts).length > 0){
var currentProduct = $('#product'+invoiceProducts);
var category = $('#category'+invoiceProducts).val();
var selectbox = true;
productSelect(category, selectbox);
}else{
var category = $('#category'+invoiceProducts).val();
var selectbox = false;
productSelect(category, selectbox);
}});}, "html");
invoiceProducts++;
}
The problem I have is that everything revolves around a counter (var invoiceProducts). Therefor when I select a value in SelectboxA0, the value of SelectboxB1 will change (instead of B0). Any way to solve this thing, by for example making the object pass itself when it calls the onchange function so I can get the number out of the name/id attribute or something. A
View 5 Replies
View Related
Mar 12, 2010
My application reads an array of URLs in Javascript and displays them in a table. I need to create mouseover events for each of the links (just an alert message for now.) I have tried this a few ways, but for each one the mouseover event fires for each link before anything else is loaded on the page, and when the page is loaded, no link is displayed. Here are the two ways I've tried:
var cell1 = document.createElement("TD");
cell1.innerHTML = '<A HREF= ' + url + 'onMouseOver="' + alert("my alert box"); + '"> my page </A>';
cell1.innerHTML = '<A HREF= "' + url + '"> my page </A>';
cell1.onMouseOver = alert('alert');
I have also tried many variations of these including:
[Code]..
View 3 Replies
View Related
May 17, 2011
I want to create dynamic radio button group with different names.
<script language="javascript">
function changeIt()
{
[code]...
I want to create a radio button group(2 radio buttons on a group) with different name.
View 2 Replies
View Related
Jul 23, 2005
I am having a problem with the last results. I can't seem to be able to
get the input2A and input3A to appear. I don't seem to have a problem
with the show and hide after a number is entered and submitted. If
anyone can answer my problem I will be greatly appreciated with a
prize. I actually have submitted it more than once and I haven't had
anyone been able to answer it yet. Code:
View 5 Replies
View Related
Jul 23, 2005
INTRO: I tried to clean it up for easy reading. I hope I didn't make
any mistakes.
PROBLEM: WOW, this is some crazy sh!t. I can't get my checkbox (see
"TAGSELECTED") to print my textboxes (see "TAG#") when more than 1
number (see "VLANS") is inputed into my form.
QUESTION: How do I make my dynamic form have a dynamic input box(which
is created by checking the checkbox and calling the functionC1) inside
it and still be able to pass the values to my php page? Code:
View 4 Replies
View Related
Oct 25, 2010
I have made a script where you can add extra fields, and next to the row is a span that automatically displays the outcome from a calculation of three fields in that row. i.e. Q x (B - A) = total. Here is the bit that does the calculation:
function advCalc(selected) {
var result = Number(document.formmain.elements["quantity"+selected].value) * (Number(document.formmain.elements["provideamount"+selected].value) - Number(document.formmain.elements["supplyamount"+selected].value)) ;
[Code]....
View 23 Replies
View Related
Dec 14, 2011
I'm working on a script that will produce multiple dynamic forms based on the results of an ajax request. The ajax request does a db query that will return 0 to x number of rows. For each row, a new serialized form is created. Since the forms do not exist at page load, I'm having problems getting the value of the form elements so that I can run other functions on them (update inputs and selects). I've stripped down everything so that I can show a basic example. In the example, how would I get the value of "#orderID"? The body contains a div (previousList) that has a list of items that when clicked will trigger the ajax query. It also has a div (line details) that will hold all of the forms that are generated.
<div id="lineDetails">
check it out </div>
<div id="previousFrm" class="ui-widget-header ui-state-highlight ui-corner-all">
<h3>Previous Returns/Cancels</h3>
<div id="previousList">
<ul class="previous" id="returnList">
<li id="1000997" class="names">1000997: 101853</li>
<li id="1000995" class="names">1000995: 101853</li> .....
But callingconsole.log("order line value is " + $("#orderID").val());
results in 'undefined'.
View 4 Replies
View Related
Jan 6, 2007
Hi, the following snippet of HTML works fine for standard email clients
but does not do so for web based email:-
<A
HREF="mailto:someone@nodename.demon.co.uk?subject=Freecy cle%20Extension%2
0Help%20File:-%20">Contact Me</A>
Is there a script that would ensure that I can compose an email complete
with address, subject line and some body text that will indeed work with
gmail, hotmail and so on please?
View 7 Replies
View Related
Mar 26, 2001
I've set up some reasonably simple order forms whereby people fill in the quantities and it is submitted as a 'mailto' email to my client. All straightforward stuff - works perfectly on my mac, but when tested on ths client's PC, or others, doesn't happen. I then changed this to a remote hosted cgi action formail, and still the same result! Maybe these people don't have 'sendmail' but does that explain it not working with a cgi?
View 1 Replies
View Related
Jul 23, 2005
I am building a stand alone html help system (.chm.) So the usual woes with
mailto are not going to be encountered. Likewise I am ensured all my
intended users have Outlook installed. With that said This is what I want
to do.
I have a simple html form with a an radio button option group, a listmenu, a
text box, and a text area. What I would like to do is have a user fill out
this form, and hit a button that sends the results via outlook. The TO, CC,
and subject fields will be hard coded. I want the option from the list menu
on line one, the radio button on line two, the text box on line three and
the multi-line text area starting on line 4.
I haqve searched the web, and groups all day to no avail. Everything I have
tried simply fails. I even tried breaking this down into a simple one text
box one button, with no good results via javascript. I can get it to work ok
without javscript, but instead of new lines they just overwrite each other.
View 3 Replies
View Related