HTML - <form> Tags, Having More Than One On One Page..
I have 4 <form> enclosures on one HTML page, however only the first one works. Is there a technique for using multiple ones?
Quote: <form action="default.aspx" method="POST" runat="server" id="form2"> <input type="hidden" name="datfield1" value="addcanvasdeal"> <input type="hidden" name="datfield2" value="2"> <input type="hidden" name="datfieldprice" value="12.99"> <input type="hidden" name="datfieldqty" value="2"> <input type="hidden" name="datfieldcarttype" value="1"> <input type="hidden" name="datfieldtitle" value="Item 1"> <input type="submit" value="Add to Cart" name="B1" style="float: right"> </form> Each field for each form is different. Similar TutorialsIs it possible to trigger the action of a form with a submit button that's outside the form tags? If so, how should this example be rescripted to make the input tag work outside the form tags? [/code] <html> <body> <form name="input" action="html_form_action.asp" method="get"> First name: <input type="text" name="FirstName" value="Mickey" /><br /> Last name: <input type="text" name="LastName" value="Mouse" /><br /> <input type="submit" value="Submit" /> </form> </body> </html> [/code] Hi there - I am building a simple website that uses a little CSS just for design, but the content is all basically in html. Anyways, I have no problem with the pages ('Contact' and 'Checkout') that contain form tags. Some of the problems: -the text after the tag isn't the same color or size (maybe even font?) after <form...> -due to the problem above, the spacing is all messed up -on the checkout page, the spacing above the google checkout link (in ie6/7) -in ie, the bottom of the page is spaced over 4 pixels Can anyone point me in the right direction? Also, is there a way to 'scale' the page depending on browser, computer, resolution, etc...? Thanks in advance for the help guys. <form class="contact" method="post" action="mail.php#contact" /> hello, I'm new on this site. I am making a c# app with web surfing in mind. I asked on 3 c# forums about a question I have but I am not satisfied with their answers. So I came to you too. I want to be able to clean a page(get rid of some tags), that is loading in my webBrowser control, before is rendered inside it. i DON'T want to load it into a string, because if I do that, I must remake the page. I need something that can peek at some page,but not consume it, search for some specific tag, replace/delete it, then allow the "new" page to be finally loaded in my browser. How to achieve this, using html or javascrispt or whatever? I can't explain better than that. Thank you. Hi all, I am a little lost here.. I am programming a page where many images load. It happens that the next time you visit the page, updated images with the same filename should load, but the older version of the image loads instead. I am guessing that it finds the image in the cache, with the same filename, and loads that one, thinking it's the image it's looking for. That being said, I have looked through so many forums to find a solution that would make it re-download fresh content of the page directly from the server, rather than from the cache. here is the code that seems fairly unanimous: <META HTTP-EQUIV="Expires" CONTENT="-1" /> <META HTTP-EQUIV="Pragma" CONTENT="no-cache" /> <META HTTP-EQUIV="Cache-Control" content="no-store" /> <META HTTP-EQUIV="Cache-control" CONTENT="no-cache" /> <META HTTP-EQUIV="Cache" CONTENT="no-cache" /> <META HTTP-EQUIV="Expires" CONTENT="thu, 01 Jan 1998 12:00:00 GMT" /> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> But still with this code in the head tag, the updated images don't get loaded from the server... Any ideas?? Thanks so much, Steph Hi, I have a website in which the menu is the same on all pages (http://www.hiltrain.com) I have set this up so that the menu item is in bold to identify the specific page the viewer is on. This works perfectly in function and is set up by using: <body id="help"> and then using the same id in the link code, e.g. <a href="howwecanhelp.htm" id="help"> In the css file I have an entry: body#help a#help, font-weight: bold; This gets the menu item for that page to be in bold and this works fine. However this doesn't vaildate well as according to the W3C standards I can't use the id twice. Can anybody advise me on a way to change these to achieve the same affect but so that it complies with W3C. Any help greatly appreciated. Cheers Iain So often when I create a form, a simple form with one text box the form tag adds a bunch of space below when I want it "lean" with zero space. For example a table row... <table> <tr bgcolor="#ffcc33"> <td valign="top" align="left" width="25%"></td> <td valign="top" align="center"><form action="http://www.sanluisshopper.com/search_businesses.php" method="GET" name="search"><input type="Text" name="search" size="20" name="search"><input type="Submit" value="Shop!"></form> </td> <td valign="top" align="right" width="25%"></td> </tr></table> Is there any way to eliminate this extra space? This has driven me batty! Thanks. I know this is probably a strange request but I'm trying to figure out how to use an area tag to define a form submit button (or the equivalent of that). Does anyone know if this can be done? i'm looking for a cheap way out of making collapse/expand code. i've learned a lot of 'ghetto' techniques n thought mayb i can use something similar to the html tricks i've learned in the past. the theory i have is.. i use the title of the collapse/expand text as a link to the text below it to open and close by using the navigating tags: Code: <a name="content">opening/closing text here</a> and the title above the content: Code: <a href="#content">Title</a> to open the area of text. now my idea of a shortcut around the whole css/html/javacript combo is to make the text below it use a Code: <font size=0>content</font> at default and have the href title link change the font size to the default 9pt but I don't know if that's even possible. Is it possible with the Code: <div> tags? and if so, using that, would i still b able to make a link like that? A page experiencing the problem I'm describing is: http://www.gigichic.com/press.aspx The issue is there's a form on the page at the bottom to submit your first name and e-mail to subscribe to a newsletter. The pages are all ASP generated, so it's a form within a form. To work around the issue, I added a </form> tag at the beginning of the new form to stop the ASP's form from continuing. This works great in Firefox, Opera, and Safari, but Internet Explorer destroys the layout. To attack the problem from a different approach, I've created a page called "newsletter.html" which contains the form and the social buttons (see he http://www.gigichic.com/newsletter.html ). The thought was - create the page, call it from an iFrame in the top bar (client wanted it up top originally). The problem there is that I can't figure out how to get the "Join" button to redirect the parent page instead of just the 36px*400px iFrame. The code for the form used is: Code: <form method="post" action="https://app.icontact.com/icp/signup.php" name="icpsignup" id="icpsignup3859" accept-charset="UTF-8" onsubmit="return verifyRequired3859();" > <input type="hidden" name="redirect" value="http://www.gigichic.com/thankyou.aspx"> <input type="hidden" name="errorredirect" value="http://www.icontact.com/www/signup/error.html"> <div id="SignUp"> <table width="100%" class="signupframe" border="0" cellspacing="6" cellpadding="0"> <tr> <td align="center"> Want to know about our latest fashions, sales and events? Subscribe to our newsletter today! <input type="text" name="fields_email" size="12" placeholder="Email Address"> <input type="text" name="fields_fname" size="12" placeholder="First Name"> <input type="hidden" name="listid" value="46074"> <input type="hidden" name="specialid:46074" value="CUNO"> <input type="hidden" name="clientid" value="250803"> <input type="hidden" name="formid" value="3859"> <input type="hidden" name="reallistid" value="1"> <input type="hidden" name="doubleopt" value="0"> <input type="image" name="Submit" value="Submit" src="/images/join.png"> </td> </tr> </table> </div> <script type="text/javascript"> var icpForm3859 = document.getElementById('icpsignup3859'); if (document.location.protocol === "https:") icpForm3859.action = "https://app.icontact.com/icp/signup.php"; function verifyRequired3859() { if (icpForm3859["fields_email"].value == "") { icpForm3859["fields_email"].focus(); alert("The Email field is required."); return false; } if (icpForm3859["fields_fname"].value == "") { icpForm3859["fields_fname"].focus(); alert("The First Name field is required."); return false; } return true; } </script> I've tried using javascript to pass the "action" values to the parent page: iFrame: Code: <script type="text/javascript"> function change_parent_url(url){ document.location=url; } </script> Parent: Code: <form method="post" action="https://app.icontact.com/icp/signup.php" name="icpsignup" id="icpsignup3859" accept-charset="UTF-8" onsubmit="return verifyRequired3859();" > <input type="hidden" name="redirect" value="javascript:parent.change_parent_url('http://www.gigichic.com/thankyou.aspx');"> <input type="hidden" name="errorredirect" value="javascript:parent.change_parent_url('http://www.icontact.com/www/signup/error.html');"> But this generates a different error. So I trying to tackle this form issue, from either a "form within a form" approach, or a "form within an iframe" approach. I'm not very good at Javascript and I don't understand the rules of ASP page generation to know how to work around it... All help is greatly appreciated. Please and thank you. Go to the web page: http://YourCarThings.com and then select "About Us" from the Top Menu. When you go to the "AboutUs" page, you will receive the error: "Done, but with errors" I caused this by replacing the: jumpmenu Java Script Go to any of the other pages, and you won't get the error message because they use the previous jumpmenu javascript. Please advise. Thanks. Doug Walker Hello, I have a simple quiz with 3 parts: the quiz, the results page, and a printable certificate. On the first page (the quiz itself), I have a form with 20 questions and at the bottom is two buttons: Submit and Reset. Both of these work great, that's not the problem. The problem is on the second page. IF the user did not score high enough, they cannot proceed to the printable certificate and must retake the quiz. For this I have a button which takes them back to the quiz. Unfortunately, I can't get it to reset the form. Here's my code for the button: Code: <input type="button" value="Try Again" name="tryagain" onClick="history.go(-1); document.TrainingVideosTest.reset()"> The form on the first page is named TrainingVideosTest. Here's the code for the reset button on the quiz page: Code: <input type="button" value="Reset" name="resetform" onClick="document.TrainingVideosTest.reset()"> Does anybody know how to reset form data from another page? I've got a data entry form where a user optionally puts data in a couple sections. It's too big to fit on-screen, so currently it's a multi-column, spreadsheet-style form. First, before I even chase this and waste everybody's time, is using tabs a good way to make a form that'd otherwise scroll through multiple sections? To make it easier to use I'm thinking about using tabs. I've found a couple examples and can display the tabs fine, but I"m having trouble understanding how to do the interaction between the form and php. The list is a set of hrefs like <li><a href="abcdform.php">a</a></li> <li id="selected"><a href="#">b</a></li> I can see that the first li is going to jump to "abcdform.php", but what does the "#" in the second li do? I want this to be a single php file with the html in it and a single php file with all the code. How do I get php to know what tab was hit? I"m generating the table rows and data in the php so how do I get the right rows of data into the right tab section? Hi guys, All of my pages are centered in the middle of the screen except my contact_us.html page which shifts half a centimeter to the right (still in the middle of the page but it moves slightly). This page contains a form inside a table. Why does it move?? I can put code up if the answer cannot be resolved from the info provided Thanks, Raggy How can I place the php form into the html page? Please see the attachment describe what I asking for. thank you. Hello, I have a form which links to Results.htm Basically I want the title of that page which opens in a new window to be whatever was input in the form previously. Hope you all can help me, it's been bothering me for quite some time. Thanks, Jooey I've got a form on our contact us page where people can send us emails directly through our website. I want to set it up so when a person hits send, they are redirected to a landing page where it says something like, We have received your message, blah blah blah..... How do I do this? Hey everyone, This is my first post here, and I was hoping you guys could help me with a problem I am having. I own a race photography company and I am trying to find a way to create a form that athletes can fill out and it will take them to their images. I have keyworded all the images on my smugmug site with a race id followed by a number, such as "gunstock 6" So if they visit http://blahblahblah.smugmug.com/keyword/gunstock 6 it will bring up all the images of them from that race (every image keyworded with gunstock 6) However..... what I want to do is make that into a form which will take them to that specific page. I am a newbie when it comes to designing forms and webpages, and after searching around, it seemed the form get command sort of achieves what I want, in that it takes the form input and places it in the url. However... it also places the usual query text such as the question mark, =, and all that good stuff. So when I enter the race id and number on my form, it will instead take me to the url .../keyword/?=gunstock&=6, which instead of being a defined page with all of the images keyworded gunstock 6, it will just bring me to the keyword search page of smugmug. Is there any way to design a form that redirects simply to the .../keyword/raceid # url format? Thanks a million! how can i submit this form to my email can any1 one edit it and fix it for me please thank you make sure it works iv tried but it don't work cuz i cnt name the form Code: <script> function validate() { var at=document.getElementById("email").value.indexOf("@" && ".") var age=document.getElementById("age").value var fname=document.getElementById("fname").value var lname=document.getElementById("lname").value var address=document.getElementById("address").value var header=document.getElementById("header").value var footer=document.getElementById("footer").value submitOK="true" if (fname.length<2) { alert("Please Enter Your Name") submitOK="false" } if (fname.length>12) { alert("Please Enter Your Name") submitOK="false" } if (lname.length<2) { alert("Please Enter Your Last Name") submitOK="false" } if (lname.length>12) { alert("Please Enter Your Last Name") submitOK="false" } if (isNaN(age)||age<18||age>100) { alert("You have to be over 18 to place a online Order") submitOK="false" } if (address.length<25) { alert("Please Enter a valid Address in the Following Format\n\n House/Flat Number\n\n Name of Road/Street\n\n Post Code\n\n Town and the City") submitOK="false" } if (at==-1) { alert("Please Retype Your Email, The Email you Entered is not Valid") submitOK="false" } if (header.length<3) { alert("Please Enter Your Area Phone Code") submitOK="false" } if (footer.length<8) { alert("Please Enter Your Phone Number") submitOK="false" } if (submitOK=="false") { return false } function shaz() { alert("Are You Sure you want to Reset the Whole Page") } } </script> <body> <BODY BACKGROUND="http://img452.imageshack.us/img452/9413/wallpaperox6.jpg" BGCOLOR="white" TEXT="blue" > <center><IMG SRC="contact.gif"> </center> <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> Age (Over 18's Only ): <input type="text" id="age" size="20"><br /> <p> Address:<br><textarea id="address" cols="40" rows="5" ></textarea> <p> E-mail: <input type="text" id="email" size="20"><br /> <p> Primary telephone: (*<input type="text" id="header" size="2" maxlength="4">) <input type="text" id="footer" size="7" maxlength="8"> <p> Card Type: <select id="cardtype" onchange='alert("You Have selected "+ cardtype.value)'><br> <option value = "Home">Home </option> <option value = "Work">Work </option> </select> <p> <input type="submit" value="Click here To Continue" onClick="validate()"> <body> <form onreset="shaz()"> <input type="Reset"> </body> </html> |