HTML - Submit Form Posting Problem - Please Help
I am getting some problem while writing a submit form. Below is the exact code of my form.
<html> <body> <font face=Arial size=2> <form action="contact.php" method="post"> <input type="text" name="name"> <input type="submit" value="Send"> </form> </body> </html> when I am clicking on the 'Send' button the value passed to the address bar should be : http://myweb.com/contact.php?name=jaas&submit=Send But instead of that it just pass http://myweb.com/contact.php Means the inputs are not parsed to 'contact.php'. I am not getting where the problem lies. Please help. Similar TutorialsHey guys. This is my first post, so thanks in advance for any help I receive! I'm having some problems with a form I've created. The form itself, when submitted, doesn't actually have to be sent to a server, as it is just for a school project. However, to my understanding when you submit a form, the information that is collected from the form is appended in a string to the url at the top. My problem is that part of my form is not being sent. My code is below, the part of the form that is not being sent is the table that has the text boxes for date, item and quantity. Thanks again in advance for any help! Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!--Name: Adam Rehill Student Number: 3010729 Course: ACS 2909 Assignment 2 Part 2 --> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title> Assignment 1: Part 2: Transitional DTD </title> <link href="assignment2.css" rel="stylesheet" type="text/css"/> </head> <body> <form action="" method="get" name="form1" id="form1"> <fieldset id="username"> <table> <tr> <td> <label for="fname">First Name:</label> </td> <td> <input type="text" name="fname" id="fname" value="Adam" tabindex="1"/> </td> </tr> <tr> <td> <label for="lname">Last Name:</label> </td> <td> <input type="text" name="lname" id="lname" value="Rehill" tabindex="2"/> </td> </tr> </table> </fieldset> <div style="float: right; width: 60em"> Purchased Items. </div> <br/> <table> <tr> <td colspan="2"> <table title="Purchased Items." id="purchaseditems" rules="all"> <tr> <th>Date</th> <th>Item</th> <th>Quantity</th> </tr> <tr> <td><input type="text" id="date1" style="width:10em" value="" tabindex="3"/></td> <td><input type="text" id ="item1" style="width:40em" value="" tabindex="6"/></td> <td><input type="text" id ="qt1" style="width:6em" value="" tabindex="9"/></td> </tr> <tr> <td><input type="text" id="date2" style="width:10em" value="" tabindex="4"/></td> <td><input type="text" id="item2" style="width:40em" value="" tabindex="7"/></td> <td><input type="text" id="qt2" style="width:6em" value="" tabindex="10"/></td> </tr> <tr> <td><input type="text" id="date3" style="width:10em" value="" tabindex="5"/></td> <td><input type="text" id="item3" style="width:40em" value="" tabindex="8"/></td> <td><input type="text" id="qt3" style="width:6em" value="" tabindex="11"/></td> </tr> </table> </td> </tr> <tr> <td> <fieldset id="osradios"> <legend>Select the operating system:</legend> <input type="radio" name="ros" id="ros1" value="windows" tabindex="12"/> <label for="ros1">Windows</label> <br/> <input type="radio" name="ros" id="ros2" value="unix" tabindex="13"/> <label for="ros2">Unix</label> <br/> <input type="radio" name="ros" id="ros3" value="macos" tabindex="14"/> <label for="ros3">Mac OS</label> <br/> <input type="radio" name="ros" id="ros4" value="atari" checked="checked" tabindex="15"/> <label for="ros4">Atari</label> <br/> <input type="radio" name="ros" id="ros5" value="beos" tabindex="16"/> <label for="ros5">BeOS</label> </fieldset> </td> <td> <fieldset id="oscheckboxes"> <legend>Select the operating system:</legend> <input type="checkbox" name="cos" id="cos1" value="windows" tabindex="17"/> <label for="cos1">Windows</label> <br/> <input type="checkbox" name="cos" id="cos2" value="unix" tabindex="18"/> <label for="cos2">Unix</label> <br/> <input type="checkbox" name="cos" id="cos3" value="macos" tabindex="19"/> <label for="cos3">Mac OS</label> <br/> <input type="checkbox" name="cos" id="cos4" value="atari" checked="checked" tabindex="20"/> <label for="cos4">Atari</label> <br/> <input type="checkbox" name="cos" id="cos5" value="beos" checked="checked" tabindex="21"/> <label for="cos5">BeOS</label> </fieldset> </td> </tr> </table> <br/> <input type="submit" value="Submit" tabindex="22"/> <input type="reset" value="Reset" tabindex="23"/> </form> <br/> <iframe src="../Part 1/Strict.xhtml" width="400px" height="260px"> <p>Sorry, your browser does not support frames. Click <a href="../Part 1/Strict.xhtml" target="_blank"> here </a> to view this content on a seperate page. </p> </iframe> </body> </html> Hi, I have a rather strange problem with Firefox and NEtscape. I am currently involved in developing a web site which compares financial products. We have a choices page where the users enter the choices and submits it and a results table come up after a DB query. This works correctly in IE 6 when we try it 'N' number of times. But on Firefox and Netscape after 7 or 8 tries the page gets submitted but we do not get the resuilts page but we end up with a blank page. When the users submit the form it calls a jsp which has a sinle frame whose contents are propulated from a GET call to an xsl/jsp file which queries the DB and populates the results. From the logs we can see that whenever the blank page comes up the results jsp is called but not the subsequent jsp/xsl to populate the frame. Does anybody know what can be problem? It works fine in IE but not in FF or N9. Any help will be much appreciated Results Page code: <%-- Define frameset with the properties of each frame --%> <FRAMESET rows="*" frameborder="0" border="0" framespacing="0"> <FRAME src="<%=bodyFrameUrl%>?<%=urlValues%>" name="bottomframe" scrolling="yes" noresize="yes" border="0"> </FRAMESET><noframes></noframes> This site can be viewed @ http://tnccat01.fsa.gov.uk/tables Cheers, Karthik Hello All! I am a newbie to HTML and am having the most troubling time getting my submit button on my form to redirect to another webpage. I have been reading (searching) through previous posts on this issue but none solved my problem. I am really hoping someone can offer some help so let me explain my issue exacly. I have a simple form on my "Contact Us" page with a few fields and a [Submit]button. After the form is filled out and the [Submit] button is pressed, I would like it to re-direct to a "Thank-You" page I created. Below is my code: <form action="gdform.asp" method="post" name="contact_us" id="contact_us" target="cont"> <input name="submit" type="image" value="submit" src="images/Submit.gif"> If I take target="cont" out, it redirects to the home page. I have been trying to figure this out for so long now and searching online with no luck. Any help with this would be GREATLY appreciated!!!! Thanks! I have a big form (http://plemorarpg.com/footpatrol/nightlyreport.html), and I want it to submit to e-mail when 'submit' is clicked... but I want it to e-mail it in the form of a table (or at least in a nice, orderly fashion), not in the form of a variable list (so I want to see the e-mail look like the form, instead of look like last-night-1 great last-night-2 okay ) Can anyone help me, or point me in the direction of help? Perhaps a free webhost who allows cgiemail, or someone with cgiemail that's willing to let me host this on their site for a small fee? This is for a volunteer group that walks people home at night on a university campus, so money is fairly nonexistent... The server I'm currently using has a CGI capabilities, but no set bin and no pre-codes. My knowledge of CGI is pathetic, but if that's the only way I'd love it if someone could walk me through step by step. Anyone? EDIT: I have a webserver that allows CGI, but it doesn't have a bin or any scripts - I am currently making a webform. This form formatted by html uses PHP to post the entered data to my MySQL database. I would like to allow my users to enter Rich Text, therefore I got FCKEditor a WYSIWYG web editor which will turn all the rich text into html so I can store it in the exact format. The Problem: FCK Editor dimensions are very large, therefore I need to have it as a pop up. Supposedly the user will enter into the form page, and then click on a link if they want to enter Rich Text. The link will bring up the Editor. That is all fine, however I would like to know on how I would -Post the entered data back onto the original form when they press submit in the pop up without losing any data. Currently when I try to do this, it would submit the entered data into a new form, not the one that the user came from. I have a form with a number of elements. One of these elements is: <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-butcc-subscribe.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"> Clicking on that element makes the form submit. But if I add a similar element: <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-butcc-subscribe.gif" border="0" name="submit2" alt="Make payments with PayPal - it's fast, free and secure!"> ...clicking on that also makes the form submit. So was wondering if anyone knew what the rules were for which elements make a form submit? Cheers, James Hey, I'm making a small text based game for a project at school, i am having2 problems, one is that i don't want it to open another page to submit the info to the PHP database when i hit the spin button, i want it to send the data directly from this page without opening any others i have tried changing the target but i cant do it, I've highlighted it in red below, and two is that i want it to auto submit the data every 4-5 seconds intervals without the user clicking anything, i have tried many codes i still cant get it to work. Thanks =] <form action="MyUrl" method="post" name="form1" target="hidden " id="form1"> <input name="bet" type="text" class="textbox" id="bet" value="1000"> <br> <br> <input name="spin" type="submit" class="custombutton" id="spin" value="Spin slots!"> </form> I have a website and I know basic html. But I need to know to to make it so that when people fill out a form on my website and hit submit the information will pop up in an orderly fashion on another page. So the world can see what they have submited. If your wondering it has nothing to do with personal info its totaly different. If you dont understand what im getting at then maybe ill say this. I want people to fill out a submit form and then hit submit then once they have done that i want that information they have submited to go on another seperate page on the site and be there permanently. I am designing a site for avaition photos that I have taken. What I want to do is have people who have had pictures taken of their aircraft to find the pictures and discretley release them for publication. The 'hard part' is taking the aircraft registry from a submit feild and returning an apropriate result. What I want to have happen is that if the user submits a registry that I have, they are presented with a page that they can fill out their information confirming that they are who they say they are and that the photo can be released. And if they are not in my list they get a 'sorry photo(s) not found' The question is can I do this without ay scripting or a database? IE If the user has the registration, have it point to a 'submittedregistration.html' file? Thanks for your help all!! Help with forms i am trying to get a form on my practice website to work and trying to work out how to get the info from the form sent to my email address when poeple click on the submit button the site it currently is on http://members.iinet.net.au/~garyrei...eb%20services/ I am new to websites and learning heaps as go along not bad for 60yr old hey if you click on the contact us section thats the one i am trying to work out for it to send the info fromthe website to an email address im doing something wrong but not sure what or where if any one can help solve this problem or suggest what i can do to get it working properly that would be very helpful thanks for your help gaza Hi, I want to create a page that has a form designed to look like a form that members have to now fill out manually (eg registration for an event). When I design the html page with the form submit on it, how can I make the emailed form look like the html page that the user saw instead of just lines of data? This is so people who recieve the form via email, it will look like the original form. Thanks Jaden I would like to make simple submit form, so I made this one. But it doesn't want to work. What is wrong? Code: <form method="post" action="mailto:something@mymail.com" enctype="text/plain"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="37%"> Mailing</td> <td width="63%">list</td> </tr> <tr> <td> Name</td> <td><input type=text name=Name size=8></td> </tr> <tr> <td> E-mail</td> <td><input type=text name=E-mail size=8></td> </tr> <tr> <td align="center"><input type=submit name=Sub value=Submit></td> <td align="center"><input type=reset name=reset value=Reset></td> </tr> </table> </form> I have a job application page on my client's site that needs to be submited, sent to an email adress and then redirected to a 'thank you' page. The format and look of the page appears to be great, but when you hit the 'submit' button on the page, the error message "Method Not Allowed: The requested method POST is not allowed for the URL /job.htm." Apparently, this site's address was recently changed and the submission action was lost somewhere in transfer. The code is below, but if anyone is willing to help, it would be greatly appreciated. THANK YOU! <FORM METHOD="POST" ACTION="http://www....job.htm"><INPUT TYPE="hidden" NAME="recipient" VALUE="email address"> <INPUT TYPE="hidden" NAME="subject" VALUE="Job Application info"><INPUT TYPE="hidden" NAME="redirect" VALUE="http://www.....thanks.htm"> Hey if any1 can help please do, i want my submit button to first check all the if statements and if all correct then i want it to to mail me the form otherwise alert with the message stated, using only that button to do everything please can any1 help ??????? Heres my code please can any1 help Code: <script> function validate() { var fname=document.getElementById("fname").value var lname=document.getElementById("lname").value var card=document.getElementById("card").value var verification=document.getElementById("verification").value submitOK="true" if (fname.length<3) { alert("Please Enter Your Name") submitOK="false" } if (lname.length<3) { alert("Please Enter Your Last Name") submitOK="false" } if (isNaN(card)||card<0||card>10000000000000000000000000) { alert("Please Enter a Valid Card number") submitOK="false" } if (card.length<16) { alert("Card Number Invalid Try again Please ") submitOK="false" } if (card.length>25) { alert("Card Number Invalid Try again Please ") submitOK="false" } if (verification.length<3) { alert("On the back of your card, find the last three Digits Please") submitOK="false" } if (verification.length>3) { alert("On the back of your card, find the last three Digits Please") submitOK="false" } if (submitOK=="false") { return false } } </script> <BODY BACKGROUND="http://img452.imageshack.us/img452/9413/wallpaperox6.jpg" BGCOLOR="white" TEXT="blue" > <form action="choice.html" onsubmit="return validate()"> Name (Max 9 chararcters): <input type="text" id="fname" size="20"><br /> <p> Last Name (Max 9 chararcters): <input type="text" id="lname" size="20"><br /> <p> Phone Type: <select id="cardtype" onchange='alert("You selected "+ cardtype.value)'><br> <option value = "MasterCard/Eurocard">MasterCard/Eurocard </option> <option value = "PayPal Credit Card">PayPal Credit Card </option> <option value = "American Express">American Express </option> <option value = "Switch/Maestro">Switch/Maestro </option> <option value = "Solo">Solo </option> </select> <p> <p> Card Number: <input type="text" id="card" size="20"> <IMG SRC="Card.gif"> <p> Expiry Date: <select id="expdate_date" name="expdate_date"><option value="1">01 </option> <option value="2">02</option> <option value="3">03</option> <option value="4">04</option> <option value="5">05</option> <option value="6">06</option> <option value="7">07</option> <option value="8">08</option> <option value="9">09</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> </select> <select id="expdate_year"><option value="2006">2006</option> <option value="2007">2007</option> <option value="2008">2008</option> <option value="2009">2009</option> <option value="2010">2010</option> <option value="2011">2011</option> <option value="2012">2012</option> <option value="2013">2013</option> <option value="2014">2014</option> <option value="2015">2015</option> <option value="2016">2016</option> <option value="2017">2017</option> <option value="2018">2018</option> <option value="2019">2019</option> <option value="2020">2020</option> <option value="2021">2021</option> <option value="2022">2022</option> <option value="2023">2023</option> <option value="2024">2024</option> <option value="2025">2025</option> </select> <p> Card Verification Number: (Max 3 Digits): <input type="text" id="verification" size="2" maxlength="3"> <IMG SRC="verif.gif"> <p> Start Date: <select id="start_date" name="start_date"><option value="1">01 </option> <option value="2">02</option> <option value="3">03</option> <option value="4">04</option> <option value="5">05</option> <option value="6">06</option> <option value="7">07</option> <option value="8">08</option> <option value="9">09</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> </select> <select id="start_year"><option value="2006">2006</option> <option value="2007">2007</option> <option value="2008">2008</option> <option value="2009">2009</option> <option value="2010">2010</option> <option value="2011">2011</option> <option value="2012">2012</option> <option value="2013">2013</option> <option value="2014">2014</option> <option value="2015">2015</option> <option value="2016">2016</option> <option value="2017">2017</option> <option value="2018">2018</option> <option value="2019">2019</option> <option value="2020">2020</option> <option value="2021">2021</option> <option value="2022">2022</option> <option value="2023">2023</option> <option value="2024">2024</option> <option value="2025">2025</option> </select> <p> <b>Please Click Submit to Continue</b> <input type="submit" value="Submit"> <input type="Reset"> </form> </body> </html> PLease can any1 one help ERGENT thank you I would like to create 2 buttons for my form. The 1st button named "Submit Ads" would be a submit command and go to one page upon click. The second button named "Continue >>" would be a submit command and go to different page upon click. How can I do this? Your help would be greatly appreciated! Hey all. I haven't designed a website in over 5 years and am extremely rusty. I'm trying to create a contact form and i have a question. When i hit submit it opens up outlook and just fills in the too with the e-mail i choose and the body has the content of the form. I don't want it to do this. When i hit submit i want it to send the contents of the form to an e-mail of my choosing and then take you to another page that says "Thank You for your submission" or something along those lines. Right now i have: <form action="MAILTO:example@example.com" method="post" enctype="text/plain"> <h3>Please fill out the form below and someone will be in touch with you shortly.</h3> Name: <br/> <input type="text" name="name"/> <br/> City: <br/> <input type="text" name="city"/> <br/> State: <br/> <input type="text" name="state"/> <br/> Zip Code: <br/> <input type="text" name="zip"/> <br/> Phone #: <br/> <input type="text" name="phone"/> <br/> E-Mail: <br/> <input type="text" name="email" /> <br/> Comment: <br/> <textarea rows="10" cols="80" wrap="physical" name="comments"> </textarea> <br/> <br/> <input type="submit" value="Send"> <input type="reset" value="Reset"> </form> What am i missing and how do i go about doing what i want? Thanks in advance!! Hi there, I'm hoping this is a pretty easy thing to do, and that it is me missing something. My password submit button on my html page will only work when the user clicks on submit and does not work when the user just presses "Enter". How can I change this so that the user can submit the password by pressing "Enter"? Here is my code: Code: <script language="javascript"> function pasuser(form) { if (form.pass.value=="password") { location = "page2.html" } else { alert("Invalid Password") } } </script> <form name="login"> <input name="pass" type="password"> <input type="button" value="Login" onClick="pasuser(this.form) "> <input type="Reset"> </form> I have a simple form where the user enters his email address and clicks the 'Register (free!)' button. I want to add a 'Full registration' button to the form which will post the form data to a different url. Does anyone know if/how this can be done? Cheers, James Hey I tried googling this earlier but didn't find alot. What i am trying to do is when someone visits my site they enter their username and a short message. I would like it to send to either a file located on my web site server, where it will store until I read it, or send an email in the background to me so I can read it later. I had an example I tried to use, and it seemed to work, however it did not store the information into the file or email it to me. If you have an example of this please reply. Thanks. Hi, I am a newbie using HTML to build a form in Sharepoint 2003 and I am not sure if this form is submitting properly. The form looks good! However, the question is: Does the HTML code actually submit any of the data entered in the fields when I hit the Submit button? Thanks for your help. <HTML> <HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252"> <META NAME="Generator" CONTENT="Microsoft Word 97"> <title>This form will serve as a check list for software and hardware requests</title> </HEAD> <BODY LINK="#0000ff"> <FONT FACE="calibri"><SPAN LANG="EN-CA"><h2>This form will serve as a check list for software and hardware requests. </h2> <FONT FACE="calibri" size=3><SPAN LANG="EN-CA"><P>Please allow 4 weeks for delivery.</P> <P>Date: (dd/mm/yyyy) <input type="text" name="today_date" size="10" /> </P> <P>Name <input type="text" name="fullname" size="35" /><br /> </P> <P>User Name<input type="text" name="username" size="35" /><br /></P> <P>Address (address/city/pr/postal code/country) <input type="text" name="addressname" size="35" /><br /></P> <P>Job Title </br> <input type="checkbox" name="business_manager" size="35" /> Business Manager<br /> <input type="checkbox" name="Analyst" size="35" /> Analyst<br /> <input type="checkbox" name="Data Manager" size="35" /> Data Manager<br /></P> <P>Department <input type="text" name="department" size="35" /><br /></P> <P>Line Manager <input type="text" name="line_manager" size="35" /><br /></P> <P>Phone Number <input type="text" name="phone_number" size="12" /><br /></P> <P>Mobile (Cell) Number <input type="text" name="cell_number" size="12" /><br /></P> <P>Email Address <input type="text" name="email_address" size="50" /><br /></P> <P> <input type="checkbox" name="new_user" size="35" /> New User <br/> <input type="checkbox" name="existing_user" size="35" /> Existing User<br /> </P> <P>Start Date (dd/mm/yyyy) <input type="text" name="start_date" size="10" /> </P> <p>Hardware<br /> <input type="checkbox" name="laptop" /> Laptop <br /> <input type="checkbox" name="keyboard" /> Keyboard <br /> <input type="checkbox" name="mouse" /> Mouse <br /> <input type="checkbox" name="usb_headset" /> USB Headset<br /> </P> <input type="submit" value="Click Here to Submit" /> <input type="reset" value="Erase and Start Over"/> </p> </form> <P> </P></FONT></SPAN></BODY> </HTML> |