HTML - Forms With Calculation Feedback
Hey guys new here so thank you in advance for any help.
I am building my first site and I want to have a form on it where users of the page can submit info into a form and then be provided info about that info. For example: How many A's do you want to buy? User inputs a number or selects from a drop down of numbers How many B's do you want to buy? User inputs a number or selects from a drop down of numbers Then I want to the user to see instant feedback on the site that says "Your total is $x.xx" Is this possible? Thanks again Similar Tutorialsis there a script that i can use in my html website to allow a customer to add feedback on my site? Hi all, I had created a feedback form using the tutorial found he http://www.thesitewizard.com/getting...mweaver6.shtml In that tutorial if the user leaves a required field empty they will be taken to a seperate error page (and a seperate thank you page for when a comment is sent successfully). I'd like to know how to change it so that a small window appears, much like how the following is set up: http://www.easynic.com/feedback.php?interest=true Or alternatively, have a line appear on the page indicating that a mistake has been made (while having the window appear for a successfully sent comment). 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> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <? $mailto = 'eoghandevlin@btinternet.com' ; $subject = "EPD Q. S. Solutions Comment" ; $formurl = "http://www.epd-qs-solutions.com/comments.htm" ; $errorurl = "http://www.epd-qs-solutions.com/error.htm" ; $thankyouurl = "http://www.epd-qs-solutions.com/thankyou.htm" ; $uself = 0; $headersep = (!isset( $uself ) || ($uself == 0)) ? "\r\n" : "\n" ; $fname = $_POST['fname'] ; $sname = $_POST['sname'] ; $telephone = $_POST['telephone'] ; $email = $_POST['email'] ; $comments = $_POST['comments'] ; $http_referrer = getenv( "HTTP_REFERER" ); if (!isset($_POST['email'])) { header( "Location: $formurl" ); exit ; } if (empty($fname) || empty($sname) || empty($telephone) || empty($comments)) { header( "Location: $errorurl" ); exit ; } if ( ereg( "[\r\n]", $fname ) || ereg( "[\r\n]", $sname ) || ereg( "[\r\n]", $telephone ) ) { header( "Location: $errorurl" ); exit ; } if (get_magic_quotes_gpc()) { $comments = stripslashes( $comments ); } $messageproper = "This message was sent from:\n" . "$http_referrer\n" . "------------------------------------------------------------\n" . "Name of sender: $fname\n, $sname\n" . "Email of sender: $email\n" . "------------------------- COMMENTS -------------------------\n\n" . $comments . "\n\n------------------------------------------------------------\n" ; mail($mailto, $subject, $messageproper, "From: \"$fname\" \"$sname\" <$email>" . $headersep . "Reply-To: \"$name\" <$email>" . $headersep . "X-Mailer: chfeedback.php 2.07" ); header( "Location: $thankyouurl" ); exit ; ?> <body> </body> </html> Any help is greatly appreciated! Niall ................................................................................................. I made a directory lister with the following attributes: Images will be displayed as thumbnails Thumbnails are automatically generated Page is automatically updated and redrawn on each access All colors, fonts, and sizes are customizable One index file is required to be placed in each directory It is simply a graphical directory lister - nothing needs to be configured for it to work http://www.phpstory.net/graphics/75 I'm looking for some feedback for improvement and can pretty much make anything happen. It's complete for the most part but I guess first thoughts and suggestions would be helpful in completing the script. I want to make it publicly available at some point and I haven't really gotten enough feedback to call it "finished". It was coded by me 100% - nothing has been borrowed or copied! Thanks!! Hi there, I have come across a great piece of code work. See the 'Feedback' option at the bottom of this page: http://www.adobe.com/products/ I would so like to incorporate the same on my website. Would greatly appreciate assistance with code. Best, wirefree I have a document I've created in HTML and I'm attempting to be able to have people fill it out and save the results. The document contains radio buttons, check boxes, and text fields that need to be filled out. Now I need a way to have the results saved and sent to me. For some reason I thought if they saved the page after compleating it and e-mailed it to me it would save their results, but it just sends the orriginal page. Any suggestions. hi all, Im new on this site.... Im in the process of designing my own site and im finding it difficult to find some code which will allow me to attach a photo to my feedback form and all the data getting sent to my email address, I have completed the whole form and it works fine, i just need some help for attaching a photo option to the form and emailing that to my own email address. Can anyone help please? Thanks Hi Guys, I'm trying to put together a simple feedback form floating on top of my background image. However the form shows up with scroll bars on right side and bottom of the form. I've no idea why. How can I get it to just show up as normal without the scroll option? Thanks guys! HTML Code: <style type="text/css"> #main { width:689px; margin:auto; font-family:verdana,sans-serif; font-size:12px; } #header { height:600px; width:700px; background-image:url(http://i827.photobucket.com/albums/zz193/colinbrady1985/CLUB/ClubApp02. jpg); } #header a { float:left; width:140px; height:115px; text-indent:-9999px; } #header div { float:left; width:360px; height:107px; padding:10px; color:#fff; overflow:auto; } img { display:block; border:0; } form { width:517px; padding-top:10px; margin:0; background-color:#01abe8; } form p { padding:0 5px; font-size:11px; color:#fff; text-align:center; } form div { padding-bottom:10px; } form label { float:left; width:146px; padding-left:5px; color:#fff; } form .required{ font-size: 13px; color:#f00; } form .btn { margin-left:153px; } form .btn1 { margin-left:150px; } </style> <div id="main"> <div id="header"> <a href="">albums</a> <div id="text"><font size="4" face="Arial"> <div> <div style=" top:245px; left:45px;"> <form method="post" action="sendmail.php"> Email: <input name="email" type="text" /><br /> Message:<br /> <textarea name="message" rows="8" cols="20"> </textarea><br /> <input type="submit" /> </form> </div> </div> </div> </div> hi i m new to programming i need a program for age calculation whch displays years months hours minutes , each must b displayed seperately, n the input method must b shown with examples like how to input the dates, ex dd/mm/yy Enter your date of birth Month � Date� Year You have been living for: In months: In weeks: In days: In hours: In minutes: In seconds: In Milliseconds: Your next birthday will be in: and this program must b embeded in any website by users Hello, I worked very hard on creating this calculation form. Now I am trying to input some radio buttons (MALE/FEMALE). The formulas are different: MALE function formula(x,y){ return ((x+y-1)/12); FEMALE function formula(x,y){ return ((x+y+1)/12); Can someone please help me?? I gave up trying after 7 h. I can`t do this anymore, it seems impossible to me. <script type="text/javascript"> function $(el) { return document.getElementById(el); } function formula(x,y){ return ((x+y-1)/12); } function check() { var x=parseInt($('x').value); var y=parseInt($('y').value); if($('x').value.length>0 && $('y').value.length>0) { $('result').value=formula(x, y); } } </script> <table> <tr><td width="50%"><font face="arial" size="2" color="#FFCCFF"><b><input type="radio" name="male" value="male"checked>MALE</b></font></td> <td width="50%"><font face="arial" size="2" color="#FFCCFF"><b><input type="radio" name="female" value="female">FEMALE</b></font></td></tr> <tr><td> x:</td><td><input type="text" id="x" onclick="this.select()"/></td></tr> <tr> <td> y:</td><td><input type="text" id="y" onclick="this.select()"/></td></tr> <tr><td> Rezult <input name="button" type="button" onclick="check()" value="calculate" /></td><td><input id="result" type="text" disabled style="width:100px; height:40px; text-align:center; vertical-align:middle"/></td> <tr><td> </td> <tr> <td> </td> </table> </td> THANK YOU!!!!! Could someone please tell me how to do the simplest of calculations on a webpage? Take in a few values - three or four only. Do some multiplying on them. Output the results to the page. I know it can't be done in html. I feel it is probably a javascript candidate. But how, exactly, to put the two together and do it? Sorry to be so dumb. We all gotta start somewhere. Hey guys! I'm working on a web page for a loan redemption calculation. I want people to enter the loan amount, the interest rate, and the monthly redemption rate. The program should tell them then how many month it takes to pay back the entire loan and how much accumulated interest they have to pay. I tried it with this loop : (interestRate , loan and redemption are defined before this loop) Code: monthCount = 0 begOfMonth = loan interest = 0 valueWithoutInterest = 0 endOfMonth = 1 accInterest = 0 for(i=1;endOfMonth>0;i++){ interest = begOfMonth * interestRate / 1200 accInterest = accInterest + interest valueWithoutInterest = begOfMonth + interest endOfMonth = valueWithoutInterest - redemption begOfMonth = endOfMonth monthCount = i } document.getElementById("resLoan").innerHTML = loan document.getElementById("resInterest").innerHTML = interestRate document.getElementById("resRedRate").innerHTML = redemption document.getElementById("resIntPayed").innerHTML = accInterest document.getElementById("resRuntime").innerHTML = monthCount for some reason, this loop is infinite. When i modify the loop to calculate only 1 month, the numbers are correct. When i let it calculate 2 month, the accInterest explodes to a completely wrong value. I checked it so many times and i just cant find any mistake... I hope one of you guys can help me. thanks in advance! ps: sorry for the grammar Hello All, I am new to this, and not sure if this is the right forum. But, I have a simple web page with drop down menus where I can put values for a calculation. I would like to have the values saved as an input file for a python script that resides on the server. I would like the input file to be created and then the script executed and the output appear as a new page. I have googled this and have come up empty. Can someone point me in the right direction. Thanks, Bryan hey guys im having trouble understanding how forms work. i know how to make forms
Code: <form action=""> Username: <input type="text" name="username"><input type="button" value="Check Availability"> <br /> <p></p> Password: <input type="password" name="password"> <br /> <p></p> Confirm Password: <input type="password" name="confirmpass"> <br /> <p></p> E-mail Address: <input type="text" name="email"> <br /> <p></p> Confirm E-mail: <input type="text" name="confirmemail"> <br /> <input type="submit" value="submit"><input type="reset" value="reset"> </form> but i dont really understand how to send that information to a different file, then later be able to get that information from the file and "log in". any help would be nice Hello and thank you for having such a good resource for html online. I am trying to accomplish something and am not sure how to go about doing it. What I need to do is have a box that has multiple check boxes with I guess you can call them responses next to them. When the boxes are checked, I would like to be able to have a next button, that would bring me to another set of check boxes and of course answers. At the end of all of this, I would like to have whatever was checked put into a box at the end, that could be copy and pasted into another document. I am basically trying to make a function at my job easier. I have seen it done before, but am not sure what it would be called. I have dabbled a bit with html and for the life of me cannot figure it out. Not looking for someone to do this for me or even walk me through it, but just a point in the right direction. Thanks in advance. How do we get better form boxes rather than the usual ones ? And does anyone know the code to make a the border of a form box glow when we move the mouse over them ? Thnx in Advance !! Okay, I'm trying to make a form that sends the information entered to my email address. I don't know if it's the code or not but all it seems to be doing is opening up a blank email directed to the address. Here's the code: <form action="MAILTO:lifeisbetteroutsidethebox@hotmail.com" method="post" enctype="text/plain"> <p align="center"><strong>Your Full Name:</strong><br /><input name="name" type="text" class="style8" size="20"> </p> <p align="center"><strong>Your Email Address:</strong><br /> <input name="mail" type="text" class="style8" size="20" /> </p> <p align="center"><strong>Your City:</strong><br /> <input name="city" type="text" class="style8" size="20" /> <p align="center"> <input name="Send" type="submit" id="Send" value="Send"> <input name="Reset" type="reset" id="Reset" value="Reset"> </form> Okay, any help please? Hi there - I tried searching for the answer to thsi question all over the web and have been unable to find the answer so I hope that someone here can help me. I have made a simple form that emails the results to me. However, once submitted the page stays stagnant. It doesnt go anywhere. Once submitted, I would like it to go to another page - like a thank you page. Here is the page: http://www.lillypad.net/content/article.html/1298177 Here is the code I am using: <form action="MAILTO:charbennett@gmail.com" method="post" enctype="text/plain"> <h3>Home Auctions Information. Please fill out the form below and it will be emailed to an agent. You will be contacted within 24 hours </h3> <br> First name: <input type="text" name="firstname" size="40"> <br> Last name: <input type="text" name="lastname" size="40"> <br> Address 1: <input type="text" name="address1" size="40"> <br> Address 2: <input type="text" name="address2" size="40"> <br> City: <input type="text" name="city"> <br> State: State: <select name="state"> <option value="AL">ALABAMA</option> <option value="AK">ALASKA</option> <option value="AZ">ARIZONA</option> <option value="AR">ARKANSAS</option> <option value="CA">CALIFORNIA</option> <option value="CO">COLORADO</option> <option value="CT">CONNECTICUT</option> <option value="DE">DELEWARE</option> <option value="DC">DISTRICT OF COLUMBIA</option> <option value="FL">FLORIDA</option> <option value="GA">GEORGIA</option> <option value="HI">HAWAII</option> <option value="ID">IDAHO</option> <option value="IL">ILLINOIS</option> <option value="IN">INDIANA</option> <option value="IA">IOWA</option> <option value="KS">KANSAS</option> <option value="KY">KENTUCKY</option> <option value="LA">LOUISIANA</option> <option value="ME">MAINE</option> <option value="MD">MARYLAND</option> <option value="MA">MASSACHUSETTS</option> <option value="MI">MICHIGAN</option> <option value="MN">MINNESOTA</option> <option value="MS">MISSISSIPPI</option> <option value="MO">MISSOURI</option> <option value="MT">MONTANA</option> <option value="NE">NEBRASKA</option> <option value="NV">NEVADA</option> <option value="NH">NEW HAMPSHIRE</option> <option value="NJ">NEW JERSEY</option> <option value="NM">NEW MEXICO</option> <option value="NY">NEW YORK</option> <option value="NC">NORTH CAROLINA</option> <option value="ND">NORTH DAKOTA</option> <option value="OH">OHIO</option> <option value="OK">OKLAHOMA</option> <option value="OR">OREGON</option> <option value="PA">PENNSYLVANIA</option> <option value="RI">RHODE ISLAND</option> <option value="SC">SOUTH CAROLINA</option> <option value="SD">SOUTH DAKOTA</option> <option value="TN">TENNESSEE</option> <option value="TX">TEXAS</option> <option value="UT">UTAH</option> <option value="VT">VERMONT</option> <option value="VA">VIRGINIA</option> <option value="WA">WASHINGTON</option> <option value="WV">WEST VIRGINIA</option> <option value="WI">WISCONSIN</option> <option value="WY">WYOMING</option> </select> <br> Phone 1: <input type="text" name="Phone1"> <br> Phone 2: <input type="text" name="Phone2"> <br> <center> Tell us a little about the home you are selling </center> <br> For Sale Address 1: <input type="text" name="forsaleaddress1" size="40"> <br> For Sale Address 2: <input type="text" name="forsaleaddress2" size="40"> <br> City: <input type="text" name="city"> <br> State: <select name="state"> <option value="AL">ALABAMA</option> <option value="AK">ALASKA</option> <option value="AZ">ARIZONA</option> <option value="AR">ARKANSAS</option> <option value="CA">CALIFORNIA</option> <option value="CO">COLORADO</option> <option value="CT">CONNECTICUT</option> <option value="DE">DELEWARE</option> <option value="DC">DISTRICT OF COLUMBIA</option> <option value="FL">FLORIDA</option> <option value="GA">GEORGIA</option> <option value="HI">HAWAII</option> <option value="ID">IDAHO</option> <option value="IL">ILLINOIS</option> <option value="IN">INDIANA</option> <option value="IA">IOWA</option> <option value="KS">KANSAS</option> <option value="KY">KENTUCKY</option> <option value="LA">LOUISIANA</option> <option value="ME">MAINE</option> <option value="MD">MARYLAND</option> <option value="MA">MASSACHUSETTS</option> <option value="MI">MICHIGAN</option> <option value="MN">MINNESOTA</option> <option value="MS">MISSISSIPPI</option> <option value="MO">MISSOURI</option> <option value="MT">MONTANA</option> <option value="NE">NEBRASKA</option> <option value="NV">NEVADA</option> <option value="NH">NEW HAMPSHIRE</option> <option value="NJ">NEW JERSEY</option> <option value="NM">NEW MEXICO</option> <option value="NY">NEW YORK</option> <option value="NC">NORTH CAROLINA</option> <option value="ND">NORTH DAKOTA</option> <option value="OH">OHIO</option> <option value="OK">OKLAHOMA</option> <option value="OR">OREGON</option> <option value="PA">PENNSYLVANIA</option> <option value="RI">RHODE ISLAND</option> <option value="SC">SOUTH CAROLINA</option> <option value="SD">SOUTH DAKOTA</option> <option value="TN">TENNESSEE</option> <option value="TX">TEXAS</option> <option value="UT">UTAH</option> <option value="VT">VERMONT</option> <option value="VA">VIRGINIA</option> <option value="WA">WASHINGTON</option> <option value="WV">WEST VIRGINIA</option> <option value="WI">WISCONSIN</option> <option value="WY">WYOMING</option> </select> <br> Asking Price: <input type="text" name="askingprice"> <br> Number of Bedrooms: <select name="numberofbedrooms"> <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> </select> <br> Number of Full Baths: <select name="numberoffullbaths"> <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> </select> <br> Number of Half Baths: <select name="numberofhalfbaths"> <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> </select> <br> Approximate Square Footage: <input type="text" name="squarefootage" size="5"> <br> Acreage: <input type="text" name="acreage"> <br> Additional Comments about Home:<br> <Input type="text" name="comments" size="40"> <br>Please add additional information you want us to know about your home here - limit 500 characters. <br><br> <input type="submit" value="Send"> <input type="reset" value="Reset"> </form> Here is the link I would like it to go to after they submit the form: http://lillypad.net/content/featured...uredproperty=1 Thank you for any help you can give! Sincerely, Char Can somebody suggest a site where a can download an easy script to make my form work so that I can get it to my email? Thanks |