JavaScript - Novice Question About Emailing Form Submissions
I know almost nothing about javascript, but the guy who used to handle my company's forms has moved on and I need to edit one.
Specifically, the form has a field for a district number, and I need to set it up so that if a certain district number is entered, the form submission gets emailed to a specified email address. I'm not trying to make it an email-only form - the results have to be posted in an output file as well. I've tried googling for an answer but haven't found anything that answers my question. Maybe that's because I don't know enough javascript to understand the answers. Can anyone help?? Thanks! Similar TutorialsGreetings all, I am excited to have found this website as I have been trying to implement an idea for a website for about a month, but with little success. My problem is that I have little coding experience/knowledge. I am trying to create a form/calculator. My concept includes drop down menus, check boxes, roll over images, and calculations. I've been trying to do the coding in Microsoft Excel; however, this has been very cumbersome, and the look is very generic. The reason for my post here is I was hoping someone could offer advice, for a novice, on the best way to accomplish what I am looking to do. Is there a software/program that would be helpful with the coding? Am I in over my head? Thank you all for any help you can offer! Josh I've not done anything with JavaScript before, so I'm not sure what syntax error I'm committing. I have a form made in Acrobat 9 for the Mac, and on it there is a "submit via email" button. I want the resulting email, which will contain the filled out Acrobat form as an attachment, to use field from the form to populate the subject line and the CC address field. I've bodgered together some code from this Acrobat user's post, but in trying to customize it, my script has fallen apart. I think it should be a simple fix, but since I'm so new, I can't see it. My script so far is: Code: // This is the form return e-mail. Its hardcoded // so that the form is always returned to the same address // Change address on your form var cToAddr = "fogharty@xxx.xxx"; // First, get the client CC e-mail address var cCCAddr = this.getField("Teacheremail").value; // Set the subject and body text for the e-mail message var cSubLine = "this.getField("CourseNumber").value; + "corrections form submitted by " + + this.getField("TeacherName").value; var cBody = "\n Thank you for submitting your form.\n" + "Save the mail attachment for your own records"; // Send the form data as an PDF attachment on an e-mail this.mailDoc({bUI: true, cTo: cToAddr, cCc: cCCAddr, cSubject: cSubLine, cMsg: cBody}); So I would like the subject line to read (CourseNumber) corrections form submitted by (TeacherName) Acrobat tells me I have a "SyntaxError: missing ; before statement 11: at line 12" but no matter how I tweak it, I keep getting that message. I put the semi-colon in, I take the semi-colon out, I put the semi-colon back in and shake it all about.... nothing. Any help someone could give me will be greatly appreciated, thanks Oh, and would there be a way to have the sent pdf form have it's name from a couple of fields as well? So that the attached file will be called "(CourseNumber).pdf"? I am still learning HTML, JavaScript and web design, so be patient with and reply in details. I want to be able to send data store in JavaScript variable to my email account. I have tried using mailto: command and for some reason it doesn't work. C Can someone please show me how to in details. I wrote quiz using HTML and JavaScrip. Score is accumulated in a variable called myScore. Now I want to email the result of myScore to an email address. How do I go about doing this? I don't want to use the mailto: command since that require that user actually press the send command to send the email. I want this done automatically after user finishes the quiz. Please explain all replied in details since I am new to JavaScript and still learning. I am writing a Javascript to validate a web page form for a intro-to programming class. i have written the same type of page for the homework and it worked fine. and in midterm it worked fine. now when i hit submit on the this form nothing happens. Does any one have any debugging ideas or recommend tools for debugging.
Evening all A complete novice here who is trying to learn a bit about web development on a basic level. Ive kind of got my head round basic html and css, and i mean basic but its working for me and thats all i need for now What i've been trying to do is incorporate some javascript into my demo site to make it a bit more dynamic and have found some code that looks like what i need (simple slideshow) but i cant get a result the code i found allegedly just drops in amongst the index html where required and works. Trouble is if i try and save my index html to preview i cant save the file as html as it reverts to a standard text file. I tried to create an external .js file and link it to my html with no success. I appreciate it sub entry level stuff here but im stuck. source of code http://www.javascriptkit.com/script/...bleslide.shtml i want the above to drop into a div in my site. do i need anything within the head tags etc Thanks Dave I'm trying to make a similar form to what Craigslist uses where you can mail to a user provided email and make it look like it came from whatever email address the user provides. I've looked at the code from the Craigslist page and can't seem to find the correct program they are using. I've been out of the game for a while and saying my coding is rusty is an understatement. Any help would be appreciated. Hello, So all I need to do is have a checkbox above the 'submit' button that the user must check before the button becomes active. Once the user checks the checkbox, then the button becomes active - and users can click on this button to get to the new page. However, I haven't found any tutorials online that handle this exactly. What I have found is example scripts that have multiple checkboxes, etc...and if I try to remove any of them from the script, it seems to mess up the functionality. So - take this for example. This would actually work perfect, if the male/female option wasn't there, and the 'reset' wasn't there either: Quote: <head> <script type="text/javascript"> function validate(form) { // Checking if at least one period button is selected. Or not. if (!document.form1.sex[0].checked && !document.form1.sex[1].checked){ alert("Please Select Sex"); return false;} if(!document.form1.agree.checked){alert("Please check the terms and conditions"); return false; } return true; } </script> </head> <body> <table border='0' width='50%' cellspacing='0' cellpadding='0' ><form name=form1 method=post action=action_page.php onsubmit='return validate(this)'><input type=hidden name=todo value=post> <tr bgcolor='#ffffff'><td align=center ><font face='verdana' size='2'><b>Sex</b><input type=radio name=sex value='male'>Male </font><input type=radio name=sex value='female'><font face='verdana' size='2'>Female</font></td></tr> <tr><td align=center bgcolor='#f1f1f1'><font face='verdana' size='2'><input type=checkbox name=agree value='yes'>I agree to terms and conditions </td></tr> <tr bgcolor='#ffffff'><td align=center ><input type=submit value=Submit> <input type=reset value=Reset></td></tr> </table> </body> I try to manually remove the 'male/female' options for this in Dreamweaver, but then the script doesn't work properly. Can anybody help me out here? Would be greatly appreciated. Thank you Hi everyone, I'm not sure I'm posting this correctly (or if anyone is actually willing to help me out ) but I'm looking for the javascript code to create the following comparative image gallery. http://i528.photobucket.com/albums/d...evised-RBA.jpg Basically the image gallery needs to do the following. When I click on an image (small grey boxes on the bottom), that specific image will appear in the first window. When I click on another image, it will appear in the second window. And finally, click on one more image so that it appears in the third window. If I want to remove one of the images from the large window, I want to do so by clicking the clear button underneath the image I want to remove. If anyone could help me out with this, I would be EXTREMELY grateful! Hello I have been asked by a friend to put together a BMI calculator. I know there are javascript ones already out there that I could use the code for, but a) it needs to do a specific thing b) I am interested in learning a bit of jscript - hence why I just spent about 4hrs trying to get it working You can see what I have been working on here http://www.kubedp.co.uk/bmi2.html Basically - what it needs to do is the following :- - User can either enter Feet/Inches or centimeters for height - User can either enter Stones/Pounds or Kilos for weight. - If they enter Feeet/Inches and centimeters - it throws an error (similar thing for weight). It then outputs the BMI to txtBMIResults. I managed to get the validation working on not having both Stones/Pounds and Kilos filled in etc, but when it comes to the actual calculation - I am stumped. If someone could look at this for me and hopefully code it and comment it so I can understand what has been done to get it working so I might learn, that would be fantastic. http://www.bmi-calculator.net/bmi-formula.php Is the formulas for calculating BMI. Not sure if you can tell from the code - but I was trying to get it so that the calculation was always done on Kilos and Meters, so I was taking the Stones and Pounds and feet and inches and trying to convert it to kilos and metres and then run the calculation. Hope I have been clear. Many thanks for any help anyone can offer I have attempted several variations of this, none of which seem to help. I have narrowed this down to being the central problem at hand. Do i just have something out of place? Code: if (monthly_pay>=1000) {bank_account="Okay";} else if ((monthly_pay>=700)&&(monthly_pay<=999)) {bank_account="Still Okay";} else if ((monthly_pay>=500)&&(monthly_pay<=699)) {bank_account="Start to worry";} else if ((monthly_pay>=300)&&(monthly_pay<=499)) {bank_account="Panic";} else if (monthly_pay<=299) {bank_account="Chapter 9";} else {document.write("Marry Up")} } Optionally, could I not do else if and somehow use this as a Nested If? Any help appreciated, Thank You Hi I have spent some time writing a javascript online calculator. The calculator works on Safari and Firefox but not on IE or Opera. I am sure there are multiple errors in the code but have gone as far as my limited self taught experience will take me. Any help will be greatly appreciated! Here's the code I have put together. Thanks David [code] <html> <head> <script> function bettype(elm) { var bettype = elm.options[elm.selectedIndex].value; if(bettype == "qualifyingbet") { var betamount = document.form.betamount.value; var betodds = document.form.betodds.value; var betcommission = document.form.betcommission.value; var layodds = document.form.layodds.value; var laycommission = document.form.laycommission.value; var betstakereturn = parseFloat(betamount) document.form.betstakereturn.value = (betstakereturn.toFixed(2)); var betwincommissioncharged = parseFloat(betamount)*parseFloat(betodds-1)*parseFloat(betcommission/100) document.form.betwincommissioncharged.value = (betwincommissioncharged.toFixed(2)); var betreturn = parseFloat((betodds-1)*parseFloat(betamount))-parseFloat(betwincommissioncharged)+parseFloat(betstakereturn) document.form.betreturn.value = (betreturn.toFixed(2)); var betprofit = parseFloat(betreturn)-parseFloat(betamount) document.form.betprofit.value = (betprofit.toFixed(2)); var layamount = parseFloat(betreturn)/parseFloat(layodds-laycommission/100) document.form.layamount.value = (layamount.toFixed(2)); var layliability = parseFloat(layamount)*parseFloat(layodds-1) document.form.layliability.value = (layliability.toFixed(2)); var netprofit = parseFloat(betprofit)-parseFloat(layliability) document.form.netprofit.value = (netprofit.toFixed(2)); var percentretained = 100+parseFloat(netprofit/betamount*100) document.form.percentretained.value = (percentretained.toFixed(2)); } else if(bettype == "freebetstakereturned") { var betamount = document.form.betamount.value; var betodds = document.form.betodds.value; var betcommission = document.form.betcommission.value; var layodds = document.form.layodds.value; var laycommission = document.form.laycommission.value; var betstakereturn = parseFloat(betamount) document.form.betstakereturn.value = (betstakereturn.toFixed(2)); var betwincommissioncharged = parseFloat(betamount)*parseFloat(betodds-1)*parseFloat(betcommission/100) document.form.betwincommissioncharged.value = (betwincommissioncharged.toFixed(2)); var betreturn = parseFloat((betodds-1)*parseFloat(betamount))-parseFloat(betwincommissioncharged)+parseFloat(betstakereturn) document.form.betreturn.value = (betreturn.toFixed(2)); var betprofit = parseFloat(betreturn) document.form.betprofit.value = (betprofit.toFixed(2)); var layamount = parseFloat(betreturn)/parseFloat(layodds-laycommission/100) document.form.layamount.value = (layamount.toFixed(2)); var layliability = parseFloat(layamount)*parseFloat(layodds-1) document.form.layliability.value = (layliability.toFixed(2)); var netprofit = parseFloat(betprofit)-parseFloat(layliability) document.form.netprofit.value = (netprofit.toFixed(2)); var percentretained = parseFloat(netprofit/betamount*100) document.form.percentretained.value = (percentretained.toFixed(2)); } else if(bettype == "freebetstakenotreturned") { var betamount = document.form.betamount.value; var betodds = document.form.betodds.value; var betcommission = document.form.betcommission.value; var layodds = document.form.layodds.value; var laycommission = document.form.laycommission.value; var betstakereturn = 0 document.form.betstakereturn.value = (betstakereturn.toFixed(2)); var betwincommissioncharged = parseFloat(betamount)*parseFloat(betodds-1)*parseFloat(betcommission/100) document.form.betwincommissioncharged.value = (betwincommissioncharged.toFixed(2)); var betreturn = parseFloat((betodds-1)*parseFloat(betamount))-parseFloat(betwincommissioncharged)+parseFloat(betstakereturn) document.form.betreturn.value = (betreturn.toFixed(2)); var betprofit = parseFloat(betreturn) document.form.betprofit.value = (betprofit.toFixed(2)); var layamount = parseFloat(betreturn)/parseFloat(layodds-laycommission/100) document.form.layamount.value = (layamount.toFixed(2)); var layliability = parseFloat(layamount)*parseFloat(layodds-1) document.form.layliability.value = (layliability.toFixed(2)); var netprofit = parseFloat(betprofit)-parseFloat(layliability) document.form.netprofit.value = (netprofit.toFixed(2)); var percentretained = parseFloat(netprofit/betamount*100) document.form.percentretained.value = (percentretained.toFixed(2)); } else { window.alert("Please select a bet type!"); } } </script> </head> <body> 1. Select bet type<br> 2. Enter bookmaker and betting exchange details<br> 3. Apply betting exchange details<br> 4. Results for your information </span> <table width="100%" align="center"> <tr align="center"> <td> <table border="1" width="445"> <tr align="center"> <td> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td align="center"> <form name="form"> <select name="betoption" id="betoption" style="width:273px;"> <option value="typeofbet">Type of Bet. Please Select</option> <option value="qualifyingbet">Qualifying Bet</option> <option value="freebetstakereturned">Free Bet Stake Returned</option> <option value="freebetstakenotreturned">Free Bet Stake Not Returned</option> </select> </td> </tr> </table> </td> </tr> <tr> <td> <table border="0"> <tr align="center"> <td colspan="3"> Bet (Bookmaker) Details </td> </tr> <tr> <td width="140" align="center"> Bet Amount: £ </td> <td width="140" align="center"> Bet Odds: </td> <td width="140" align="center"> Bet Commission: % </td> </tr> <tr> <td width="140" align="center"> <input type="text" name="betamount" value="0" onfocus="(value='')" size="5" maxlength="5"> </td> <td width="140" align="center"> <input type="text" name="betodds" value="0" onfocus="(value='')" size="5" maxlength="5"> </td> <td width="140" align="center"> <input type="text" name="betcommission" value="0" onfocus="(value='')" size="5" maxlength="5"> </td> </tr> </table> </td> </tr> <tr> <td> <table border="0"> <tr align="center"> <td colspan="4"> Lay (Betting Exchange) Details </td> </tr> <tr> <td width="210" align="center"> Lay Odds: </td> <td width="210" align="center"> Lay Commission: % </td> </tr> <tr> <td width="212" align="center"> <input type="text" name="layodds" value="0" onfocus="(value='')" size="5" maxlength="5"> </td> <td width="212" align="center"> <input type="text" name="laycommission" value="0" onfocus="(value='')" size="5" maxlength="5"> </td> </tr> <tr> <td width="212" align="center"> Lay Amount: £ </td> <td width="212" align="center"> Lay Liability: £ </td> </tr> <tr> <td width="212" align="center"> <input type="text" name="layamount" size="5" readonly="readonly"> </td> <td width="212" align="center"> <input type="text" name="layliability" size="5" readonly="readonly"> </td> </tr> </table> </td> </tr> <tr> <td> <table border="0"> <tr align="center"> <td colspan="2" align="center"> For Your Information </td> </tr> <tr> <td width="212" align="center"> Net Profit: £ </td> <td width="212" align="center"> Percentage retained: % </td> </tr> <tr> <td width="212" align="center"> <input type="text" name="netprofit" size="5" readonly="readonly"> <td width="212" align="center"> <input type="text" name="percentretained" size="5" readonly="readonly"> </td> </tr> </table> <input type="hidden" name="betstakereturn" value="0" size="5" > <input type="hidden" name="betwincommissioncharged" value="0" size="5" > <input type="hidden" name="betreturn" size="5" > <input type="hidden" name="betprofit" size="5" > <table border="0"> <tr align="center"> <td width="212" align="center"> <button type="reset" value="Reset">Reset</button> </td> </form> <td width="212" align="center"> <input type="submit" value="Calculate" onclick="bettype(betoption);"> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </body> </html> [code] I am not sure if I am in the right section. I tried to search this but couldn't find what I needed. I am very limited on my javascript knowledge. I need a video player that functions almost exactly like the one in this example: http://www.popcap.com/games/bookworm...L_1_8_19_08_en {the links that toggle between the video and flash slideshow depending on which is clicked. The player showing the videos and screenshots for the game}. I tried looking at the source to understand the functions, but my code is not working. I know the player is calling some javascript, but I'm not sure I understand it all. Can someone explain to me the basic functioning of this player as shown? I would very much appreciate it. Hello to everyone, I got a bit of a situation here, I wrote this code that basicaly what it does is, gets code from input field, sends it to php file get the results back and also calls the second php page to chage the prices but kill me I cant figure out what I did wrong Can anyone help? Here is the code: <div style = "position: relative; width: 100%; height: 100%;" id = "idCouponRequest"> <table width="100%" border="0" cellspacing="4" cellpadding="4" id = "tblCoupon"> <tr> <td class="detHeadTxt" align="right" valign="middle">Enter Your Coupon:</td> <td width="165" align="center" valign="middle"><input id = "edtCoupon" type="text" name="coupon" size="32" maxlength="15"></td> <td width="175" align="right" valign="middle"><INPUT type="image" name="coupon" src="images/redeem.gif" class = "mnCurs" border="0" onclick = "javascriptostCheckout();"></td> </tr> </table> </div> <script language = "javascript"> var couponCode; function postCheckout() { getContent('includes/checkout/processCoupon.php', 'coupon_code=' + document.getElementById('edtCoupon').value, function () { couponCode = document.getElementById('edtCoupon').value; var win = document.getElementById('idCouponRequest'); win.innerHTML = '<table border = 0 width = 100% height = 100%><tr><td align = center valign = center class = \"detCartHead\">Processing Coupon...</td></tr><tr><td align = center valign = center><img src="images/rating_loading.gif" alt="loading" /></td></tr></table>'; }, function () { if (xmlHttp.readyState != 4) return; var res = xmlHttp.responseText; var win = document.getElementById('idCouponRequest'); win.innerHTML = res; refreshOrderSumm(); }); } function refreshOrderSumm() { getContent('includes/checkout/processOrderSumm.php', 'coupon_code=' + couponCode, function () { var win = document.getElementById('divSummLoading'); win.style.display = ''; }, function () { if (xmlHttp.readyState != 4) return; var res = xmlHttp.responseText; var win = document.getElementById('divSummLoading'); win.style.display = 'none'; var win = document.getElementById('divCouponSumm'); win.innerHTML = res; }); } </script> Hi I have an insert form.....to insrt data to DB. if user typed in something, BUT clicked on an url in navigation menu TO GO to an OTHER Page...I would be able to give an alert to user-"please submit the form" some thing that way.....Is it possible to do?? pls suggest me some example... TIA I'm trying to implement a registration form (which I made), but then after pressing submit button I would like to display on the main page using javascript the information I have entered. I'm really weak with javascript, so if some on could point me in the right direction I would appreciate it. (ps. This shouldn't be printed in a alert window) Hey guys I'm trying to build a form to fill out using HTML and Java. I've got a problem coming up with some of the questions. What I would like to do is have a pre-displayed list of certain questions and have extras show up depending on the response. I've gotten it to work as long as there is only a single question displayed at a time. Any help available? Code: <div id="li_17" > <label class="description" for="element_17">Sample Question 1? </label> <span><a href="#" onclick="toggle_visibility('li_17a');"> <input id="element_17_1" name="element_17" class="element radio" type="radio" value="1" /> <label class="choice" for="element_17_1">Yes</label></a> <input id="element_17_2" name="element_17" class="element radio" type="radio" value="2" checked="checked"/> <label class="choice" for="element_17_2">No</label></span> <p class="guidelines" id="guide_17"> <small>(specify source, husband or wife if married debtor, beginning and ending dates of fiscal year if there are any)</small></p> <li id="li_17a" style='display:none;>Extra Form Spot</li> </div> <div id="li_18" > <label class="description" for="element_18">Sample Question 2? </label> <span><a href="#" onclick="toggle_visibility('li_18a');"> <input id="element_18_1" name="element_18" class="element radio" type="radio" value="1" /> <label class="choice" for="element_18_1">Yes</label></a> <input id="element_18_2" name="element_18" class="element radio" type="radio" value="2" checked="checked"/> <label class="choice" for="element_18_2">No</label></span> <p class="guidelines" id="guide_18"> <small>(specify source, husband or wife if married debtor, beginning and ending dates of fiscal year if there are any)</small></p> <li id="li_18a" style='display:none;>Extra Form Spot</li> </div> Sorry if the code is crap. I'm still fairly new to this. Thanks! Hello All, I have a rather complex (well, to me at least, it's complex ) "loop" (not in a programming way, but in a metaphorical way) that I need to close, and, considering that a lot of Javascript (as well as some .php) is involved, I was hoping I could get some help here. My project involves a form that pulls data from an xml file, and then has the user check radio buttons on whether they approve of the information pulled from the xml file. The user then submits the form (that includes their email address), then, a pdf file of the form information, including the xml data AND the radio button and text data, is automatically generated and emailed to the user. The form-to-pdf software I'm using is found at this link: http://coreyworrell.com/blog/article...pdf-attachment the Demo is he http://coreyworrell.com/demos/pdf_email/form.php (Excellent software, by the way. A html form that, upon submission, dynamically creates a pdf file of the form, and then automatically emails that file to whomever you want, including the user? Tooooo cool.) I've set up a sample, below, for what the entire loop needs to do. The first file is the "test.xml" file that includes the sample data: Code: <?xml version="1.0" encoding="UTF-8"?> <dataroot xmlns:od="urn:schemas-microsoft-com:officedata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Quotediscrepancy.xsd" generated="2011-01-14T11:03:31"> <XMLtest> <Name>Bob Jones</Name> <Address>123 4th Street</Address> </XMLtest> </dataroot> The second file is the form itself -- sample_form.php -- that pulls the data from the test.xml file, AND includes form elements like radio buttons and text fields: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <HEAD> </HEAD> <body> <form action="pdf.php" method="post"> <script type="text/javascript"> if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("GET","test.xml",false); xmlhttp.send(); xmlDoc=xmlhttp.responseXML; document.write("<table border='1' cellpadding='5'>"); document.write("<tr><td> <b>Customer</b>"); document.write("</td><td> <b>Address </b>"); document.write("</td></tr>"); var x=xmlDoc.getElementsByTagName("XMLtest"); for (i=0;i<x.length;i++) { document.write("<tr><td>"); document.write(x[i].getElementsByTagName("Name")[0].childNodes[0].nodeValue); document.write("</td><td>"); document.write(x[i].getElementsByTagName("Address")[0].childNodes[0].nodeValue); document.write("</td></tr>"); } document.write("</table>"); </script> <br><br> Email: <input type="text" name="email"> <br><br> Yes: <input type="radio" name="radio1" value="Yes"> :: No: <input type="radio" name="radio1" value="No"> <br><br> <p><button type="submit">Click Here to Submit Order</button></p> </form> </body> </html> Here's where I'm stuck. I don't know how to send all of the xml data AND the form data to the next step in the "loop" -- where the pdf file is dynamically created -- a version of the file "pdf.php" in the above-mentioned softwa Code: <html> <head> <style> body {font-family:Helvetica, Arial, sans-serif; font-size:10pt;} table {width:100%; border-collapse:collapse; border:1px solid #CCC;} td {padding:5px; border:1px solid #CCC; border-width:1px 0;} </style> </head> <body> <h1>Form Results</h1> <table> <tr> <td>Name:</td> <td><?php echo $post->name; ?></td> <td>Address:</td> <td><?php echo $post->address; ?></td> <td>Email:</td> <td><?php echo $post->email; ?></td> </tr> <tr> <td>Yes:</td> <td colspan="3"><?php echo $post->yes; ?></td> </tr> <tr> <td>No:</td> <td colspan="3"><?php echo $post->no; ?></td> </tr> </table> </body> </html> Any ideas? MUCH thanks. What I'm trying to test out and learn is the process of a form using the get methode to print out the entered number to another test.htm page 1st code is the form Code: <html> <head> <script type="text/javascript"> </script> </head> <body> <form action="test.htm" method="get"> <font size="1" face="tunga">Enter a number</font> <input type="text" name="number" size="2"> <input type="submit" value="Submit"> </form> </body> </html> the 2nd code is the test.htm page I was hoping the value of var = number would document.write to this page. I was hoping I could do this without using ASP of php. I can see in the URL after the second page loads that the var number dos = the numbered entered but I can not get it to display. Code: <html> <head> </head> <body> <script type="text/javascript"> document.write("The number you entered is " + number); </script> </body> </html> as you can see im a beginner and im trying to learn this. I hope its not a stupid question Thanks John I am trying to develop a form that can give an estimate to viewers based on their input and I'm having a problem with decimal points. I couldn't find a very good free script online so I've done some work with this one http://www.mikeandzachsbbq.com/Catering/catering.htm When you enter 10 in the input box, it calculate 10*19.99, giving 199.9, but I want it to show 199.90. I've tried adding toFixed(2) in there, but I'm not able to get that to work....any ideas? Thanks in advance |