HTML - Passing A Variable Into Form Mailto Function
Hi
My first post here, so I hope it's a good one! I have a form which I want a javascript function to be able to manipulate the action= line. the reason I want this is so I can manipulate the subject line. the javascript looks like this: Code: <script language="JavaScript"> function getMAILTO(){ var mailto = "andy.plumb@conwy.gov.uk?subject=EN$(FORMNO)"; alert(mailto) document.Enrolment.action = mailto; } </script> I have put the alert in so i can see what the variable produces. The form line looks like this: HTML Code: <form action="mailto:javascript:getMAILTO()" method="post" > Similar TutorialsHi folks - right then, think im being thick here lol <input type="hidden" name="amount" value="myvariable2"> I have a variable say called myvariable1, how do I pass that into the above so that value becomes equal to it? ie myvariable2 = myvariable1 myariable2 also needs to be/become numeric. Any help appreciated, ta karl This htm file contains no errors, but the "amount" value is not passed to the form (does not appear on the shopping cart). If I type in the value for the amount in the input field, everything works fine, but I need the amount to be dependent on the item_name selected. The shopping cart just shows this error message "Some required information is missing or incomplete." Any suggestions? <HTML><HEAD><TITLE>PlaceOrder Page</TITLE> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> <META http-equiv=Pragma content=no-cache> <META http-equiv=Expires content="Thu, 1 Jan 1970 01:00:00 GMT"> <META content="MSHTML 6.00.2900.2802" name=GENERATOR> <script language="javascript"> function pricecheck(list) { var selectedproduct = list.options[list.selectedIndex].value; var amount = ""; if (selectedproduct == "5050_Sink") { amount .value = "67.00"; } else if (selectedproduct == "6040_Sink") { amount .value = "66.00"; } } </script> </HEAD> <BODY text=#000000 bgColor=#ffffff background="white"> <form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post"> <BR><font size=4 color="red"><B>FIRST</B></font><font size=4 color="blue"><B> - Select the Sink Model</B></font><BR><BR> <select name="item_name" onChange="pricecheck(this)"> <option value="not selected">Select a Sink</option> <option value="5050_Sink">5050 Sink</option> <option value="6040_Sink">6040 Sink</option> </select> <BR><BR><font size=4 color="red"><B>SECOND</B></font><font size=4 color="blue"><B> - Select the Color</B></font><BR><BR> <select name="item_number"> <option value="not selected">Select a Color</option> <option value="Earth_Fossil">Earth Fossil</option> <option value="Earth_Soil">Earth Soil</option> <option value="Earth_Dirt">Earth Dirt</option> </select> <BR><BR><BR> <table border="0" cellspacing="0" cellpadding="0"> <tr> <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but22.gif" border="0" name="submit" alt="Add to Cart"> <input type="hidden" name="add" value="1"> <input type="hidden" name="cmd" value="_cart"> <input type="hidden" name="business" value="bobsmithatyahoo.com"> <input type="hidden" name=" amount "> <input type="hidden" name="no_note" value="1"> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="lc" value="US"> <input type="hidden" name="bn" value="PP-ShopCartBF"> </td></tr> </form> </table> </BODY></HTML> Hi, I have recently got a book on HTML and XHTML, and I was looking at forms. I would like a form to send the info to my e-mail: Rautoner@hotmail.co.uk , but whenever I try it, it asks if I would like to send it / security warning (which I don't want) and then it opens the url: mailto:Rautoner@hotmail.co.uk (which is wrong). Can anybody fix this? Code: <form action="mailto:Rautoner@hotmail.co.uk" method="post"> Name:<input type="text" name="Name"> Age:<input type="text" name="Age"> <input type="submit" value="Send"> </form> guys, im having an issue with my mailto form iv pasted the code bellow: basicly the form dosent seem to be working correctly... i dont have the email arrive in my inbox!! http://www.bristolheatingsolutions.co.uk/contact.html Code: <FORM action="mailto:Patrick@bristolheatingsolutions.co.uk" method="post" enctype="text/plain"> <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="4" WIDTH="90%"> <TR> <TD width="30%"><DIV align="right"> <B>Name :</B> </DIV> </TD> <TD width="70%"> <INPUT type="text" name="name" size="50"> </TD> </TR> <TR> <TD><DIV align="right"><B>Address :</B></DIV> </TD> <TD> <INPUT type="text" name="address" size="50"> </TD> </TR> <TR> <TD><DIV align="right"><B>Town :</B></DIV> </TD> <TD> <INPUT type="text" name="town" size="50"> </TD> </TR> <TR> <TD><DIV align="right"><B>Post Code :</B></DIV> </TD> <TD> <INPUT type="text" name="postcode" size="50"> </TD> </TR> <TR> <TD><DIV align="right"><B>Home Tel :</B></DIV> </TD> <TD> <INPUT type="text" name="house Tel" size="50"> </TD> </TR> <TR> <TD><DIV align="right"><B>Mobile Tel :</B></DIV> </TD> <TD> <INPUT type="text" name="mobile tel" size="50"> </TD> </TR> <TR> <TD><DIV align="right"><B>Email Address :</B></DIV> </TD> <TD> <INPUT type="text" name="email address" size="50"> </TD> </TR> <TR> <TD><DIV align="right"> <B>Comment:</B> </DIV> </TD> <TD><textarea name="comment" cols="50" wrap="virtual" rows="4"> </textarea></TD></TR> <TR> <TD> </TD> <TD> <INPUT type="submit" name="submit" value="Submit"> <INPUT type="reset" name="reset" value="Reset"> </TD></TR> </TABLE> </FORM> I have no idea on how to create a mailto form. I want the user to be able to send information to me, and I want an automated, automatic reply to be sent back to them. I am not looking for anyone to do it for me. Just tell me where I can read up on it. ok. this is my code Code: <html> <body> <h3>This form sends an e-mail to W3Schools.</h3> <form action="MAILTO:(?)" method="post" enctype="text/plain"> Contact:<br /> <form action=""> <select name="names"> <option value="***@hotmail.com">Trevor</option> <option value="***@hotmail.com">Nick</option> <option value="***@hotmail.com">Sam</option> </select> </form> <br/> Name:<br /> <input type="text" name="name" value="your name" size="30" /> <br /> Your e-mail:<br /> <input type="text" name="mail" value="your e-mail" size="30" /> <br /> Comment:<br /> <input type="text" name="comment" value="your comment" size="40" /> <br /><br /> <input type="submit" value="Send" /> <input type="reset" value="Reset" /> </form> </body> </html> as you can see i am trying to send a email to the three adresses though a drop down menu. the (?) is where im not sure what to put. any ideas? Hey all, I've never had problems with this before, but I can't figure out where I've gone wrong. I am trying to use a simple mailto action on my form, but I am not receiving any email to a number of email addresses (which i have been trying one at a time ). I have checked my spam folders/filters. Any help would be appreciated. Here is the code (with my email address removed) - I have not really done any formatting: Code: <form method="post" action="mailto:me@me.com"> Name: <input type="text" name="Name" size="20"><br> Email: <input type="text" name="email" size="20"><br> <input type="submit" value="Submit"> </form> Thank you for your time! I made a form and cant figure how to get it to submit and not have it all in just a long line of text. I think it has something to do with the enctype. but I'm new to forms. Here is an equivalent to what i have so far. Code: <form enctype="text/plain" method="post" action="mailto:name@address.com"> <input type="text" name="first name" value="John"> <br> <input type="text" name="last name" value="Smith"> <br> <input type="submit" value="submit"> </form> Using the following code, how can I have the information sent to the email address and also redirected to another page when the user clicks submit. <html> <body> <FORM METHOD = Post action="mailto:code.bro@verizon.net" Enctype="text/plain"> First Name: <input type ="text" name="firstname"/>   Last Name: <input type ="text" name="lastname"/> <br/> <br/><dd/> Comments orSuggestions: <br/><dd/> <textarea name="comment" rows="10" cols="50"></textarea> </textarea> <input name="redirect" Type="hidden" value="index.html"> <input name="next_url" Type="hidden" value="index.html"> <br>           <input type = "submit" value="send"> <input type = "reset" value="clear"> </form> </body> </html> HTML Code: <form method="post" action="mailto:xxxxxxxx@xx.com "> <table class="text3"> <tr><td valign="top" width="140">Voornaam:</td><td><input name="requiredvoornaam" type="text" id="requiredvoornaam" class="veld" size="30" /></td></tr> <tr><td valign="top" width="140">Achternaam:</td><td><input name="requiredachternaam" type="text" id="requiredachternaam" class="veld" size="30" /></td></tr> <tr><td valign="top">E-mail:</td><td><input name="requiredemail" type="text" id="requiredemail" class="veld" size="30" /></td></tr> <tr><td valign="top">Telefoonnummer:</td><td><input name="requiredtelefoonnummer" type="text" id="requiredtelefoonnummer" class="veld" size="30" /></td></tr> <tr><td valign="top">Adres:</td><td><input name="requiredadres" type="text" id="requiredadres" class="veld" size="30" /></td></tr> <tr><td valign="top">Woonplaats:</td><td><input name="requiredwoonplaats" type="text" id="requiredwoonplaats" class="veld" size="30" /></td></tr> <tr><td valign="top">Aankomstdatum:</td><td><select name="adag" id="adag"> <option value="Dag">Dag</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> <option value="13">13</option> <option value="14">14</option> <option value="15">15</option> <option value="16">16</option> <option value="17">17</option> <option value="18">18</option> <option value="19">19</option> <option value="20">20</option> <option value="21">21</option> <option value="22">22</option> <option value="23">23</option> <option value="24">24</option> <option value="25">25</option> <option value="26">26</option> <option value="27">27</option> <option value="28">28</option> <option value="29">29</option> <option value="30">30</option> <option value="31">31</option> </select> <select name="amaand" id="amaand"> <option value="Maand">Maand</option> <option value="Januari">Januari</option> <option value="Februari">Februari</option> <option value="Maart">Maart</option> <option value="April">April</option> <option value="Mei">Mei</option> <option value="Juni">Juni</option> <option value="Juli">Juli</option> <option value="Augustus">Augustus</option> <option value="September">September</option> <option value="Oktober">Oktober</option> <option value="November">November</option> <option value="December">December</option> </select> <select name="ajaar" id="ajaar"> <option value="Jaar">Jaar</option> <option value="2008">2008</option> <option value="2009">2009</option> <option value="2010">2010</option> </select> </td></tr> <tr><td valign="top">Vertrekdatum:</td><td><select name="vdag" id="vdag"> <option value="Dag">Dag</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> <option value="13">13</option> <option value="14">14</option> <option value="15">15</option> <option value="16">16</option> <option value="17">17</option> <option value="18">18</option> <option value="19">19</option> <option value="20">20</option> <option value="21">21</option> <option value="22">22</option> <option value="23">23</option> <option value="24">24</option> <option value="25">25</option> <option value="26">26</option> <option value="27">27</option> <option value="28">28</option> <option value="29">29</option> <option value="30">30</option> <option value="31">31</option> </select> <select name="vmaand" id="vmaand"> <option value="Maand">Maand</option> <option value="Januari">Januari</option> <option value="Februari">Februari</option> <option value="Maart">Maart</option> <option value="April">April</option> <option value="Mei">Mei</option> <option value="Juni">Juni</option> <option value="Juli">Juli</option> <option value="Augustus">Augustus</option> <option value="September">September</option> <option value="Oktober">Oktober</option> <option value="November">November</option> <option value="December">December</option> </select> <select name="vjaar" id="vjaar"> <option value="Jaar">Jaar</option> <option value="2008">2008</option> <option value="2009">2009</option> <option value="2010">2010</option> </select> </td></tr> <tr><td valign="top">Welke huisje:</td><td><select name="huisje" id="huisje"> <option value="1">.____Huisje Zomerbries_____.</option> <option value="2">.____Huisje Wervelwind_____.</option> <option value="3">.____Huisje Tornado________.</option> </select> <tr><td valign="top">Aantal personen:</td><td><select name="aantal personen" id="aantal personen"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> </select> <tr><td valign="top">Overige vragen:</td><td><textarea name="bericht" rows="6" cols="23" id="bericht" class="area"></textarea></td></tr> <tr><td valign="top"></td><td><input type="submit" name="sendFormButton" value="Verzenden" id="sendFormButton" /></td> </tr> </table> </form> </td></tr></table> This is what i get once tested... its out of order... Help me plz...... Im not good with those thingz.. hi just wondering if someone can look over this code i have below... i think something is wrong lol its not bouncing emails to me soooo i'm kinda lost i think i have 2 forms working in one which isnt good... but can i have text input and image upload in one form?? i know you guys will be like "man this chick has it all wrong" but be nice thanks in advance kel Code: <br><br><FORM METHOD=POST ACTION="mailto:a*****@***.com" ENCTYPE="text/plain"> Name: <br><TEXTAREA NAME="COMMENTS" ROWS=1 COLS=20> </TEXTAREA> <br> Address: <br><TEXTAREA NAME="COMMENTS" ROWS=5 COLS=20> </TEXTAREA> <br> Upload image here.. For Best Results use an image as close to 1500x1500px as possible: <br><FORM METHOD=POST ACTION="mailto:*****@***.com" ENCTYPE="multipart/form-data"> <INPUT TYPE="file" NAME="upload"> </FORM> <br> <INPUT TYPE="submit" VALUE="Send"> <INPUT TYPE="reset" VALUE="Clear"> <br> </form> <!-- ** END OF FORM ** --> I'm new to all this stuff, but I am working on creating a simple drop-down menu that must pass a variable to an xml script (VXML to be exact). All files will be on a linux web host. Any suggestions on what to use for the drop-down menu web page (php, java script, etc)? Depending on what selection is chosen in the drop down, a different value need to be assigned to the variable. Thanks! Hi all, i'm new to xml but i was wondering if the following is possible: I have a html document with some tabs. And when i click on a tab it opens a xml document. In the xml document is a link to xsl sheet with a variable and i want to change that variable with the value of the link in html document. Does some one nows how? html link: <a href="#t1" target= "t1" title="[link title]">11</a> <div class="sliderkit-news" id=t1><iframe name="t1" width="100%" height="800" src=wo.xml></iframe> xml variable <xsl:variable name= "line" select="'11'"/> The number 11 should come form the a href in the html doc. Also the following is possible fill the variable with a drop down menu: <xsl:variable name= "line"> <select> <option value="'11'">11</option> <option value="'12'">12</option> <option value="'13'">13</option> </select> </xsl:variable> I want to fill the variable with a drop down selection. and then use the variable in the document. What i do is opening the xml en then it generates a display based on the xsl sheet. i hope some one can help me. Hey, I'm trying to pass a variable from some HTML code to JavaScript and I'm having some trouble. For example: HTML Code: <form name ="columnList" onchange="submitForm(this);"> Column: <c:forEach var="columnitem" items="${columns}"> <c:if test="${columnitem.name != this.document.columnList.name}"> <input type="checkbox" name="selectedColumns" id="${columnitem.name}" value="${columnitem.name}">${columnitem.name} </input> <script type="text/javascript" language ="JavaScript"> var col = document.columnList.columnitem.name; setColumns(col); </script> </c:if> </c:forEach> I'm trying to get the columnitem name from the HTML portion to the script. And I know that columnitem.name works for the check boxes. Can anyone help me out? Hi, am trying to show a page in a HTML <iframe> but before loading that page I want to set a variable value. I tried following: <iframe src="slgrid/ccustomer.php?id=" <? echo $cat; ?> "width="100%" height="100""></iframe> but can not get the value of id using $_GET['id'] Any other ideas are also welcome please. I am a little new in PHP and HTML. Any help in this regard will be appreciated. Thanks and regards, I have a simple signup form on my site that I want to pass the input to the larger signup form. Here is the code for the simple form: <form action="http://bigdogcattle.com/?a=Cattle_Mailing-List_SignUp" method="post" accept-charset="UTF-8"> The larger signup form is located he http://bigdogcattle.com/?a=Cattle_Mailing-List_SignUp I want the email address from the simple form to move to the larger form when the submit button is pressed. Ideas? In a regular form with text fields, can I pass the imput from the user directly into a hidden textarea from multiple fields intertwined with html? Example: <form> <input type="text" name="firstname"> <input type="text" name="lastname"> <input type="text" name="occupation"> <input type="hidden" value="some html + firstname + some html + lastname + some html + occupation"> </form> I think this might require some javascript. Is something like this possible? Ok, this sounds extremely easy but I'm more of a designer and less of a coder. I'll try and explain what I want to accomplish. I spent the better part of the afternoon yesterday searching for a solution. Alas, I need some assistance! We have a page where users can view a report in a PDF format from a drop down. Also on that page we need to have a place where they can select an option from a drop down and email the PDF to them. Now, we have the link set up. I can take a sample link, add my email address to the end of it, hit enter and it shoots me an email. The question is how can I take what the user inputs into a form and pass it into a URL. All that needs to happen is to send the user to that URL and have the URL be correct. At that point the email gets sent automatically. My best attempt so far gets me to the URL but things like &, =, etc are replaced by %3D and %26. The URL won't work that way. I'll post that code: Code: <FORM METHOD="LINK" ACTION="https://fusion.bennettware.com:4443/drivers/getfueltaxreport?"> <select name="unitfuel"> <option selected>Select Month</option> <option value="year=09&month=01&reportName=UnitTax">January 2009 </option> <option value="year=09&month=02&reportName=UnitTax">February 2009</option> </select> Type in your email address: <INPUT TYPE="text" NAME="&email="> <INPUT TYPE="submit" VALUE="Send email"> </FORM> Here is what I get in the URL: (sorry had to place it in html tags because the link was only half showing up.) HTML Code: https://fusion.bennettware.com:4443/drivers/getfueltaxreport?unitfuel=year%3D09%26month%3D01%26reportName%3DUnitTax&%26email%3D=test@testmail.com Also, notice that "unitfuel" gets appended to the URL as well. It gets passed into the URL and that will likely cause the report to fail. The URL needs to look like this: HTML Code: https://fusion.bennettware.com:4443/drivers/getfueltaxreport?year=09&month=01&reportName=UnitTax&email=myemail@mydomain.com If a user were logged in and ran that link, a page would appear stating that an email had been sent. So, all I need it for the input to get placed into the URL without all of the additional characters. The report cannot run when the URL looks like the above and thus cannot get emailed. Also, that link probably won't work since the site is password protected, so you'll likely get a 'page cannot be displayed' error if you try to access it. Solution is likely simple, then again, my luck would have it not being so simple! I thank you all in advance for your help. At least a point in the right direction would be nice. I wish to get the value of a textbox in a form however, I'm unable to reference the textbox using the name property (I wish to get both the name and value property values). Is there another way to get these properties values? Or pass them as parameters through an onClick event as I'm trying to retrieve these within another javascript function. |