HTML - Problem With My Form Tags
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. 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] 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. <form class="contact" method="post" action="mail.php#contact" /> Hi, I need to start this off by stating that I'm not an expert nor have I had any training but in general I can read HTML or CSS code and understand for the most part what is going on. I have been asked by my boss to migrate and update and old website and bring it onto the new php5 platform that is operating at our university. This has been a fairly straightforward task where I just copied and paste the old code into the new CMS form. But I have reach a point where using the old code and tweeking it where needed to account for the 'personality' of the CMS isn't working. This is a bilingual website translating between English and Turkish. Here is an example of how the site used to run: http://replay.waybackmachine.org/200...page/acemhoyuk In the new site I have made only minor cosmetic adjustments; font color and the side where the reduced translation sits. These changes were made in the CSS code and seem to work fine (once the css code is activated). I don't know what the correct terminology is but basicly the CSS appears to be hidden until you click your mouse on the text somewhere (both the English and Turkish translations are visible in the body of the text, not showing one and reducing the other as it is meant to). Once you click the mouse on the text then the page separates into the visible body of the text and the reduced translation on the right hand side (the correct formatting). This is an example of one of the pages doing the above: http://www.une.edu.au/cat/sites/ahlat.php Using this <div> code: Code: <blockquote> <div id="content"> <div id="container" class="left_border"> <div class="bilingual"> <div class="language_a" lang="en">English language section</div> <div class="language_b" lang="tr">Turkish language section</div> <div class="spacer"> </div> <!-- /bilingual --> <!-- /container --> <!-- /content --> </div> </div> </div> </blockquote> </div> I have been playing around with the code trying to fix this problem and by adding <div id="page" class="page_language_b"> to the beginning of the body I get the desired result so that both the text and the translation are visible from the start - but when you click on the translation to change the language everything moves into the reduced section leaving no body to the text. This page is an example of where I am achieving the above result: http://www.une.edu.au/cat/sites/acemhoyuk.php Using this <div> code: Code: <div id="page" class="page_language_b"> <blockquote> <div class="content"> <div class="container"> <div class="bilingual"> <div class="language_a" lang="en">English language section</div> <div class="language_b" lang="tr">Turkish language section</div> <div class="spacer"> </div> <!-- /bilingual --> <!-- /container --> <!-- /content --> </div> </div> </div> </div> </blockquote> </div> From my experimenting I think the problem is with the <div id="page"> but as I said before I not an expert in this so I'm not sure how to get it to do what I want. A lot of my solutions have been through trial and error. If someone could help me fix my <div> code I would be greatly appreciated. Cheers Kim 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 am using the following css <style type="text/css"> #testbar{ position:absolute; background-color: transparent; width: 730px; height: 94px; visibility: hidden; z-index: 100; } </style> then some java script then Html div tag to show the id <div id="testbar"> <a>Close</a> <script src="/testjs.js"></script> </div> The <a>close</a> following the code as i give in js but the testjs.js is not following the specifications produced by that some java script i used this one working in IE but not in firefox3.5 what might be the problem? can u give the solution ________________________ 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? Ok I have a page with multiple forms on it. All the forms are coded like this. <form action="indexreport.cfm?fuseaction=casereport" etc. etc. But for some reason one of the forms I had to code like this in order to make it work. <form action="/sales/indexreport.cfm?fuseaction=demoreport" etc. etc. Why in the world did just this one form require me to add the directory like that. All the other forms are working just fine without it. This has been vexing me all weekend, I really hope somebody can crack this one.. Thanx!! Working on the next version of my site... Can't get any of the forms to align, example: www.bkriegtech.net/2008/?page=contact Hi all I am having problem with form tab, please see http://www.cmela.com/ it looks good in FF but in IE after header it showing space, at the moment form tag is outside of the table tag, if i put form tag like this. <table> <form> <tr> <td> </td> </tr> </form> </table> this works fine but it shows errors in w3c validation any idea www.bkriegtech.net/?page=contact no longer checks for the required fields... what would cause this? I hate to beat a dead horse here.. but I just redid a contact form adding a captcha, and now nothing aligns right, and I can't seem to fix it. Can somebody fix if they have a moment? Thanks a million! The URL is www.bkriegtech.net/?page=contact Hi, I'm not sure if my question is posted in the correct section, I hope so. I wonder if somebody can help me. I have generated an opt-in form from Imnica Mail(Autoresponder). I put the code in a textbox widget in the sidebar using Wordpress. I want to add two things in the generated code - an image just above the First name textbox, and a text saying "Privacy: We respect your privacy." under the button. I don't know what I'm doing wrong, they do not show. I have copied the code below. I would be very grateful if you could help me. Thanks. <DIV class=o-form> <DIV class=o-form-header> <H3 id=o-form-title>Mail List Subscription Form</H3> <P id=o-form-description> Please fill in and submit the form below to subscribe to our mailing list.</P></DIV> <img src = "http://mysite.com/wp-admin/media.php?attachment_id=88&action=edit"> <FORM accept-charset=UTF-8 method=post action= http://www.imnicamail.com/v4/subscribe.php> <DIV class=o-form-row><LABEL for=FormValue_CustomField7891>First Name</LABEL><INPUT id=FormValue_CustomField7891 type=text name= FormValue_Fields[CustomField7891]></DIV> <DIV class=o-form-row><LABEL for=FormValue_EmailAddress>Email Address</LABEL><INPUT id=FormValue_EmailAddress type=text name= FormValue_Fields[EmailAddress]></DIV> <INPUT id= FormButton_Subscribe value=Subscribe type=submit name= FormButton_Subscribe><INPUT value=7093 type=hidden name= FormValue_ListID><INPUT id=FormValue_Command value=Subscriber.Add type=hidden name=FormValue_Command> <p> Privacy: We respect your privacy.</p> </FORM> <STYLE type=text/css media=screen>.o-form{background- color:#FFF4ED;border:1px solid #814913;} .o-form form{margin:0px;padding:0px;} .o-form .o-form-header{background-color:#814913;padding:9px;} .o-form h3{color:#fff;font-family:Arial,sans-serif;font- size:18px;line-height:18px;margin:0px;padding:0px;} .o-form p{color:#fff;font-family:Arial,sans-serif;font- size:12px;line-height:18px;margin:0px;padding:0px;} .o-form .o-form-row{margin-top:9px;padding:0 9px;} .o-form .o-form-row label{color:#814913;font-family:Arial,sans- serif;font-size:12px;display:block;font-weight:bold;} .o-form input[type="text"]{border:1px solid #814913;color:#814913;padding:5px 7px;} .o-form input[type="submit"]{margin:20px 9px 18px 9px;}</STYLE> </DIV> This is my first form so to speak and i am having a problem. I am trying to have the form data send to an email address when the user clicks submit. However, when i tested it i receive a Postdata.att file...instead of the form data in an email. I dont know what i am doing wrong. Is there an easier way to do this. I would greatly appreciate some help! Here is my code: form id="form1" name="form1" method="post" action="mailto:caleb@meshowventures.com"> <label>Full Name:<br /> <input type="text" name="Fullname" size="50" value="" /> </label><p> <label>Email Address:<br /> <input type="text" name="Email" size="50" value=""/> </label><p> <label>Interests:<br /> <textarea name="comment" rows="6" cols="40"></textarea> </label><p> <label>Would Like a Yard Sign: <input type="radio" name="YardSign" value="Yes"/> </label><p> <INPUT TYPE="submit" value="Submit"/> <INPUT TYPE="reset" value="Reset"/> </form> creating a form but having a problem with the "checked" attribute. According to the book, this html below is correct but on the page, the other option "wholebean" is always checked when reloading the page, where's the problem please? Quote: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>The Starbuzz Bean Machine</title> </head> <body> <h1>The Starbuzz Bean Machine</h1> <h2>Fill out the form below and click submit to order</h2> <form action="http://www.starbuzzcoffee.com/processorder.php" method="POST"> <p> Choose your beans: <select name="beans"> <option value="House Blend">House Blend</option> <option value="Bolivia">Shade Grown Bolivia Supremo</option> <option value="Guatemala">Organic Guatemala</option> <option value="Kenya">Kenya</option> </select> </p> <p>Type: <br /> <input type="radio" name="beantype" value="whole" />Whole bean <br /> <input type="radio" name="beantype" value="ground" checked="checked" /> Ground </p> <p>Ship to: <br /> Name: <input type="text' name="name" /> <br /> Address: <input type="text> name="address" /> <br /> City: <input type="text" name="city" /> <br /> State: <input type="text" name="state" /> <br /> Zip: <input type="text" name="zip" /> <br /> </p> <p> <input type="submit" value="Order Now" /> </p> </form> </body> </html> Hi I have designed a form using MS publisher. When i post it to my web site all it does is give me an error ( 404 page not fond ). could something wrong in my form or is it my web site. I want the data to be saved on the same page that the form is at. I did convert this to HTML be for add it to my web site. Thanks paul I am building my first site for my buisness. I am building the site from a template. There is a contact form I want to use and I am having problems with getting it to work. When I test and submit the form I get the email, but there is no information from the input fields. The thank you redirect is working ok. The email comes in blank with no text from the input fields. This is my first time setting up a email form. I have spent hours searching and I have finally raising the white flag and going to ask the pro's here. You can find the contact page here. http://www.elitemechanicalplumbing.com/contact_us.html Thank you <form action="http://www.startlogic.com/scripts/formemail.bml" id="form"><input type="hidden" name="thankyou_url" value="http://www.jjplumbinghvac.com/thank_you_contact.html"/> <div class="container1"> <div class="h"><input type="text" value="Enter your name" onblur="if(this.value=='') this.value='Enter your name'" onfocus="if(this.value =='Enter your name' ) this.value=''" /></div> <div class="h"><input type="text" value="Enter your e-mail" onblur="if(this.value=='') this.value='Enter your e-mail'" onfocus="if(this.value =='Enter your e-mail' ) this.value=''" /></div> <div class="h"><input type="text" value="Enter your phone" onblur="if(this.value=='') this.value='Enter your phone'" onfocus="if(this.value =='Enter your phone' ) this.value=''" /></div> <div class="h"><input type="text" value="Enter subject" onblur="if(this.value=='') this.value='Enter subject'" onfocus="if(this.value =='Enter subject' ) this.value=''" /></div> <textarea rows="40" cols="30" onblur="if(this.value=='') this.value='Enter message'" onfocus="if(this.value =='Enter message' ) this.value=''" >Enter message</textarea> <div class="container"> <div class="fright"> <a href="#" class="link-1" onclick="document.getElementById('form').reset()">Reset</a> <div class="indent-2"><a href="#" class="link-1" onclick="document.getElementById('form').submit()">Submit</a></div> </div> </div> </div> <input type="hidden" name="my_email" value="test@jjplumbinghvac.com"/> </form> I'm using Godaddy's gdform.php form mailer for my forms. The forms work perfectly except the validation. I need the visitors to fill in the fields and then submit the information to my email, but the problem is that everyone can submitt even if he doesn't fill in the form. I want all of the fileds to be required. Is there something wrong with the code ? Here it is : <form action="/gdform.php" method="post"> <table align="center"> <input type="hidden" name="subject" value="Form Submission"> <input type="hidden" name="redirect" value="/Add/thankmes.html"> <input type="hidden" name="required" value="YourName, Email, description"> <tr> <td><p><font color=WHITE font size=4>Your Name:</p> </font></td> <td align=center height=50><p><input type="text" name="YourName" size="52"/></p></td> </tr> <tr> <td><p><font color=WHITE font size=4>Your E-mail:</p> </font></td> <td height=50><p><input type="text" name="Email" size="52"/></p></td> </tr> <tr> <td><p><font color=WHITE font size=4>Your Message:</p> </font></td> <td><br><p><textarea name="description" cols="40" rows="5"> </textarea></p></td> </tr> <tr> <td><input type="submit" name="submit" value="Send"/></td> </tr> </table> </form> Hi Ya, I am trying to validate the telephone number for a form. I would really like some help. You see when i leave the telephone field blank the code error message comes up telling me that i cant leave that field blank. When i then put in illegal characters it says that i used illegal characters but instead of clearing the feild,allowing me to type the correct phone number and then moving onto the getradio if statement it goes to receipt page when the submit button is clicked instead of doing the validate checks first and then moving onto the receipt.html page. This is the problem area. Code: if (form.phone.value == "") { alert("Please enter your telephone number for shipping Information."); form.phone.focus(); return (false); } else { validate(); } if (getRadio("pay") == null) { alert("Please choose a payment method."); return (false); } return (true); } //--></script> <script language="javascript"> function validate() { if (isNaN(parseInt(this.value))) { alert("The phone number contains illegal characters."); form.phone.focus(); return (false); } } //--></script> The below code is for the form. Code: <FORM name="information" action="..\..\Cars\GT\receipt.html" method="get" onSubmit=" return form_Validator(this)"> <!-- Tells the button what action to take --> The below code is the full validation check function Code: <!-- This is used to validate the radio buttons to make sure that one of those options are pressed --> <script language="javascript"> function getRadio(radioName){ var inputs = document.getElementsByTagName('input'); var ret = null; for(var i = 0; i < inputs.length; i++){ if(inputs[i].type == 'radio' && (inputs[i].name == radioName || inputs[i].id == radioName) && inputs[i].checked){ ret = inputs[i].value; } } return ret; } <!-- This is used to validate the text boxes to make sure that an item is written into it --> <!-- I f the next box remains empty an error message appears --> function form_Validator(form) { if (form.first_name.value == "") { alert("Please enter your first name for shipping Information."); form.first_name.focus(); return (false); } if (form.last_name.value == "") { alert("Please enter your last name for shipping Information."); form.last_name.focus(); return (false); } if (form.address.value == "") { alert("Please enter your address for shipping Information."); form.address.focus(); return (false); } if (form.acode.value == "") { alert("Please enter the area code for shipping Information."); form.acode.focus(); return (false); } if (form.phone.value == "") { alert("Please enter your telephone number for shipping Information."); form.phone.focus(); return (false); } else { validate(); } if (getRadio("pay") == null) { alert("Please choose a payment method."); return (false); } return (true); } //--></script> <script language="javascript"> function validate() { if (isNaN(parseInt(this.value))) { alert("The phone number contains illegal characters."); form.phone.focus(); return (false); } } //--></script> </head> |