HTML - Help Help How Submit Form In This Situation
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 Similar TutorialsHi I have a Normal Div area: <div style="width:300px;height:300px;overflow:auto;border-width:0px;border-color:000000;border-style:solid;"> Text is here Text is here Text is here </div> I want when the page is loaded, the div area shows the bottom automatically i.e. The last Line I dont want users to take it down manually with the mouse everytime the page is loaded Do you know how this can be done? I've created a frameset, and on the top frame I have a flash animation, and on the main frame is where my stuff is loaded! The thing is, the top is aligned to center, and the main frame too! but on the main frame isn't aligned with the top one, I think is because of the scrollbar! It aligns between the left end of the browser and the scroll bar instead of the right end of the browser... is there a way to align without the scrollbar?? i can't disable the scrollbar because i need it LoL Hope you understand what I'm saying ... LooL check this link http://black1c3.awardspace.com/ so you can see what i'm saying the two images are not aligned... thanks for your time!! Hi! This isn't really a technical issue so much as just a plea for a little advice on how to handle this. There may be some technical solutions to help me out, but I don't know of any. I am currently working on a website for clients who happen to be very very particular about EVERYTHING. I have run into a bit of an issue and am confused as to how to solve this. Maybe you all could help me out? Lend some advice, tell me what you'd do if you were me, etc... I am going to start from the beginning. The people I'm designing for are architects that design 5 million dollar homes. They wanted a clean design with a gradient background and it took us a long time to get to the background we came to. The problem with the background is that although I designed for 1024x768 (it also displays well at resolutions up to 1440x900), my clients are working on computers with large monitors with a much higher resolution. As a result, the browser window gets stretched so far that the gradient background image isn't large enough to cover and begins to tile itself. Here is an example of one of the pages, the photo gallery, on the website. http://aciwebsites.com/dev/vanBrouck/photo.html I am in the process of trying to fix some things so I wouldn't suggest clicking around too much. Now, notice that I use PNG in my design. I had to find a way around that, as my clients wanted an HTML website (not a Flash website) with semi-opaque graphic elements and IE doesn't support PNG files. The code I use works on single images but will not work on tiled background images (I needed to use a tiled semi-opaque PNG on the sub nav and body content section backgrounds so the gradient background could show through slightly)...So I had to find a way around that as well. I ended up slicing up the background gradient image at the appropriate places in photoshop and changing the lightness on it so that when placed as the background image in the div layer, it would appear to be just a semi-opaque box with the gradient showing through. But really, it's just a jpg. (I know this is really confusing. I'm trying my best to just write it all out and explain it the best I can.) So. What my clients are seeing on their high-resolution screens is a lot of empty space filled with this tiled gradient background. This is what I need to do: Remedy the background gradient situation so that the background is no longer tiled. Why I can't decide how to do this: 1 - Stretching the background to fit the screen using a background div layer (code on how to do that he http://www.htmlcodetutorial.com/help/ftopic4503.html) will interfere with the background images in the "subnav" and "body content" boxes which were cut at specific points in Photoshop and placed within the backgrounds of the div layers as a sort of faux-opaque div layer. Basically, it'll just mess everything up and won't look right anymore. 2 - I really can't mess much with this background image. My clients are very happy with it as it is. I considered possibly messing with it a little so that it fades to one solid color at both edges and I think this may be my best bet. However, doing this would take a very very long time, as I'd have to go in and change the backgrounds on all of the pages as well as go into Photoshop and redo all the faux opaque backgrounds. 3 - I could also use javascript to automatically resize the browser window upon page load, but I often find that to be annoying and I can see how it won't go over very well with these people. Another problem is that because they're looking at this website at such a high resolution, the page content is smaller than they'd like it to be. But they don't seem to understand that their resolution is in the minority and I don't quite know how to explain to them that I optimized the website to fit on MOST screens. They just don't seem very confident about this and I feel like I'm misleading them or doing something wrong. What do you all think? I know this was a bit long-winded, but if you're up for a challenge or just feel like throwing some ideas around, feel free to take a look at the website page and go through my code. Thanks for your time. 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 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> 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> 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 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 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"> 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 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!! 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> Hey, i'm really new to HTML, but my dad's amazing at it and gradually helping learn. I'm trying to get this for my blog, a way to sign up for a newsletter i'm putting together. Here's the code i've put in but when I click submit, it just says "Method Not Allowed". Thanks. Here's what i've put in: Code: <form method=post action="/cgi-bin/example.cgi"> <input type="text" size="12" maxlength="30" /> <input type="Submit" value="Submit" action="mailto:jjrsportsfan@yahoo.com" /> </form> Thanks, Jjrsportsfan 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 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!! i have a paypal button code which is basically a form that gets submitted the code for the button wud be like this HTML Code: <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="business" value="email"> <input type="hidden" name="item_name" value="cd name"> <input type="hidden" name="item_number" value="36676y"> <input type="hidden" name="amount" value="1.00"> <input type="hidden" name="shipping" value="1.00"> <input type="hidden" name="no_shipping" value="0"> <input type="hidden" name="no_note" value="1"> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="weight" value="1"> <input type="hidden" name="weight_unit" value="lbs"> <input type="hidden" name="lc" value="US"> <input type="hidden" name="bn" value="PP-BuyNowBF"> <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"> </form> and i want to make a page that when it loads it submits that form and sends the values to paypal so it shows the payment page for my product i wanna do this coz most forums have disabled HTML in posts and i am advertising sumthing for sale so i wanna create a page for example sales... wud submit the info and redirect the user to paypal account that was submitted so basically how to activate the submit button on load event ? thanx Hi everyone, Is it possible to have a form without a submit button. I know you can use links etc to submit a form but can you just have nothing, so the user just hits the enter key and the form submits ? cheers I got a form from Response o Matic, then edited some of the HTML. I removed the link back to their website, but it deleted the Submit Button (at least when viewing in IE7 - its OK in Firefox). I put their link back, but the Submit button does not show!! Any ideas, i really don't want to repeat the form as it took hours to space it all out how i wanted it. Thanks I have never had this error before until now, where I am trying to submit a jQuery validated form, yet my submit button won't work, I currently am not using the input type submit button, even when I do use it though I get the same error as using a <a> link that calls a javascript function to submit the form, I have a duplicate of this code and it works fine on another page, but just not here. Here is my mess: http://motb.isgreat.org/ It probably is easier to just check the whole source, since my code is scattered. This website is targeted for WEBKIT BROWSERS ONLY! To navigate to the issue on the page itself, press the gold login button on the RIGHT, and try submitting the form, I know the join form doesn't work, since I am not done with the page yet. But the login form should target to http://motb.isgreat.org/login.php which has a duplicate of my form but it works, im really confused, it may be with my JavaScript. Any Help is appreciated. I know my code is messy, my excuse is only being 15, but yeah… at least most of it functions Hey there! I am wanting to create a form, so that when you click submit, all the input in the form will create a new post in the thread on my forum. This will be used to enter scores etc into the thread so it is easier to ready etc. What do I put in the html to do this? Here is what Iv got, it is only a short one just to test it out etc Quote: <form action="/newreply.php" method="POST" enctype="multipart/form-data" name="input" onsubmit="return checkForm();"> <p align="left">Your Gamertag: <select size="1" name="Team"> <option>Crimezy</option> <option>Mad Marky D</option> <option>Marcushblade87</option> <option>Sam Devo</option> </select></p> <p align="left">Week: <select size="1" name="D1"> <option>Week 1</option> <option>Week 2</option> <option>Week 3</option> </select></p> <center> <p align="left">Match: <select size="1" name="D2"> <option>Man Utd v Chelsea</option> <option>Blackburn v Tottenham</option> </select></p> <center> <p align="left">Sco <input type="text" name="T1" size="10"></p> <center> <p align="left">Comments: <input type="text" name="T2" size="20"></p> </center> </center> </center> <p align="left"> </p> <p align="left"> <input type="submit" class="submit" name="submit" value="post reply" tabindex="3" accesskey="s" /> <input type="submit" class="submit" name="previewpost" value="preview post" tabindex="4" /></p> <input type="hidden" name="action" value="do_newreply"> <input type="hidden" name="tid" value="$tid"> <input type="hidden" name="replyto" value="$pid"> <input type="hidden" name="posthash" value="$posthash"> <input type="hidden" name="removeattachment" value=""> </form> I hope somebody can help! Thanks |