HTML - Html Form Submit Button Not Working
Hi,
I got a HTML form whose submit button doesnt seem to be working, Any help would be appriciated. The link to the form is http://new.johnnyshotel.com/contact.html . I tried the same form in a different plain html file and it seems to work but when I insert it back into this webpage template the submit button doesnt seem to work. Thanks in advance. Similar TutorialsHello, I'm creating an HTML form. The Submit button is not working - when I press the Submit button, the browser opens a new tab and logs into my Yahoo account. It has never done this before. I'm using IE 9. PLEASE HELP! I'm baffled. Here's the html tags for the form: <form name="guestbook" action="mailto:kjohnson@calbaptist.edu" method="post"> <p><b>First Name:</b> <input type="text" name="fname" size="25" /></p> <p><b>Last Name:</b> <input type="text" name="lname" size="35" /> </p> <p><b>Age level:</b></p> <input name="1" type="radio" value="under18" />Under 18<br/> <input name="1" type="radio" value="18-30" />18-30<br/> <input name="1" type="radio" value="31-45" />31-45<br/> <input name="1" type="radio" value="over45" />Over 45</br> <p><b>Interests (Check all that apply):</b></p> <input type="checkbox" name="sports" />Sports<br/> <input type="checkbox" name="music" />Music<br/> <input type="checkbox" name="crafts" />Crafts<br/> <p><b>Grade Status:</b></p> <select name="gradestatus"> <option> Click on your status</option> <option> High School Student</option> <option> Undergraduate Student</option> <option> Graduate Student </select> <p><b>Comments:</b></p> <textarea name="comments" rows=5 cols=50></textarea> <br /><br /> <input type="submit" name="submit" value="Submit" /> <input type="reset" name="reset" value="Reset" /> </form> Hi all, Have encountered a problem in my code, in that when i went back to format my page, I could no longer use the submit button. I was able to find that it occurred when i added in the <table> tags within the selector function but I for the life of me cannot figure out why that makes the form invalid or whatever is happening. If any1 could have a look and see what the issue is, it would be greatly appreciated Quote: <?php session_start(); if ($_SESSION['groupid'] < 1) { header("location:login.php?message=You do not have sufficient " . "permissions to view that page. Please login."); } ?> <!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" /> <?php $page = "CapSim"; include("common/init.php"); ?> </head> <body> <?php include("header.php");?> <br/> <br/> <div id="page"> <?php include("dbconnect.php"); // Formatting $content = "<h3 align='center'>".$page."</h3>\n" . "<center>\n" ."<h3 align='center'></h3>"; $content .= "<h4>" . "Number of Tiers in the model" . "</h4>"; $TIER=$_GET["TIER"]; $content .= "<form action='capsim_home.php' method='get' target='_blank'>\n"; $content .= "<input type='text' name='TIER' value='$TIER' onKeyPress='return numbersonly(this, event)' />\n "; $content .= "<input type='submit'value='New Layer'>\n"; $content .= "</form>"; $content .= "<br/>" . "</center>\n" . "<br/><hr width='900px'/><br/>"; // Set up the form and hidden control variables $content .= "<form action='/cgi-bin/".$parentdir."/capsimController.py' method='post' target='_blank'>"; // Default values for fields $u = 10; $x = 15; $m = 16; $q = 1; $S_RT = 10000; $a_a = 2; $a_u = 3; $a_l= 1; $runs = 1; $o_i=100; $default_vals = 1; //Function for printing off the layers within the tiers I've followed this walkthrough on how to make a submit button with an image on it. The image part is working fine (along with the mouse up and over images) but the actulle submit function of the button is NOT working. Here is a link to the lession I have been following: http://www.codetoad.com/html/buttons...mit_button.asp And here is a link to the page with the non-working submit button: http://www.acreativeapproach.com/contact.html This is a pretty simple form That was made in DW. Do I need PHP to get a contact form like this to work? Thank you for your help JT Hello all, I am trying to copy a page over to my domain (with permission) and even though it looks ok, the submit buttons / field areas are not working properly. Here is the page I am trying to get working. http://www.ldodds.com/foaf/foaf-a-matic I have grabbed the appropriate .js files and everything in MY header is fine, but like I said.. I can not get the buttons to actually take the data from the fields and spit out the code in the box provided. Any help would be great, thanks! 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 Hi guys, I have made a website, and it has a text box that I want people to type their email address in, and I have a regular link next to it that says "submit" (not a button or anything). Basically I want the email address that they have entered to be emailed to me when they click the submit link. My hosting is currently just free-hosting at awardspace - is this possible to do there? If not - generally how can I make it work? Thank you for any replies posted :-) <html> <form> <p><input type="text" name="T1" size="20" /></p> <p><input type="submit" value="B1" name="B1" /></p> <p><input type="submit" value="B2" name="B2" /></p> </form> </html> Say I have the above form in a web page. When the page loads, the browser will highlight the first submit button b1, such that if the user hits enter, the form is submitted with that button. I'd like the default button to be B2, which is displayed second on the form. I'd greatly appreciate any advice on how to accomplish this. Thanks, jsfgguy 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 created a button which is linked to some JavaScript to dim the screen when it is pressed. using CSS I have changed the image of the button using a graphic. The graphic is a .PNG as it uses transparency but when set the image as the button it has lost all transparency is there anyway to enable the transparency of the .PNG this is the code I am using to do it. Code: <input type="button" onClick="d()" class="button"> I am having a bit of a problem. I need to replace a submit button with an image (addtocart.gif). It sounds easy enough, but for some reason when I change the coding, my link does not pop-up in a new window, as it currently does. I need the image to open up my shopping cart preview page. Any help would be greatly appreciated. Code: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script type="text/javascript"> var mywindow; var features='width=530,height=500,left=200,top=200,scrollbars=yes'; window.onload=function() { document.forms[0].target='mypopup'; document.forms[0][3].onclick=function() { makePopup(); } } function makePopup() { if(mywindow) { mywindow.close(); } mywindow=window.open('','mypopup',features); mywindow.focus(); } </script> </head> <body> <form method="post" action="http://ww11.aitsafe.com/cf/add.cfm"> <div> <input type="hidden" name="userid" value="D745330"/> <input type="hidden" name="price" value="19.95"/> <select name="product"> <option value="Red shirt w/ logo (XS)">X-Small</option> <option value="Green shirt w/ logo (S)">Small</option> <option value="Blue shirt w/ logo (M)">Medium</option> <option value="Red shirt w/ logo (L)">Large</option> <option value="Green shirt w/ logo (XL)">X-Large</option> <option value="Blue shirt w/ logo (XXL)">XX-Large</option> </select> <p> <input type="submit" name="post" class="submit" value="submit"/> </div> </form> </body> </html> Ok, so I hope there is a simple answer to this. I just haven't been able to figure it out. I have a basic form that has a dropdown menu. I am using an image as the submit button. The problem I am having is that the image does not align vertically properly next to the dropdown menu. Below is what my form looks like in the browser. Any ideas how to get this aligned correctly? Thanks for all help! Below is the current code I have. I havent coded in html for 6 years. Can someone either add or show me how to add a submit button that emails the info on that page to my email. I have been asked by a friend to build him a website, and right now I am a total faliure. I also need a reset button on the site that clears the info in the boxes. If someone could either just do it for me, or show me how i'd really apreciate it. Thanks everyone. Mike <html> <head> <title>Player Signup</title> <script> window.windowname= "Add Form Page" orpage= window.windowname function startForm(form) { nname= form.fname.value; nname= ((nname== "") ? nname= "" : nname= " NAME=" + nname); ntarget= form.ftarget.value; ntarget= ((ntarget== "") ? ntarget= "" : ntarget= " TARGET=" + ntarget); nenctype= form.fenctype.value; nenctype= ((nenctype== "") ? nenctype= "" : nenctype= " ENCTYPE=" + nenctype); whtml= form.HTML.value; mymethods= form.chosenmethod.selectedIndex; mymethodsarray= new Array(); mymethodsarray[0] = ""; mymethodsarray[1] = "GET"; mymethodsarray[2] = "POST"; mymethod= mymethodsarray[mymethods]; mymethod= ((mymethod== "") ? mymethod= "" : mymethod= " METHOD=" + mymethod); myaction= form.chosenaction.value; myaction= ((myaction== "") ? myaction= "" : myaction= " METHOD=\"" + myaction + "\""); nhtml= whtml + "\r <FORM" + nname + myaction + mymethod + ntarget + nenctype + ">"; form.HTML.value = nhtml; } function endForm(form) { whtml= form.HTML.value; nhtml= whtml + "\r </FORM>"; form.HTML.value = nhtml; } function newItem(txtarea, form) { addbre= (form.addbr.checked== true) ? addbre=form.addbr.value : addbre= ""; crows= form.chooserows.value; ccols= form.choosecols.value; crows= ((crows== "") ? crows= "" : crows= " ROWS=" + crows); ccols= ((ccols== "") ? ccols= "" : ccols= " COLS=" + ccols); ntoit= form.choosevalue.value; cname= form.choosename.value; cname= ((cname== "") ? cname= "" : cname= " NAME=\"" + cname + "\""); ctype= form.choosetype.selectedIndex; ctypearray= new Array(); ctypearray[0] = "text"; ctypearray[1] = "radio"; ctypearray[2] = "checkbox"; ctypearray[3] = "button"; ctypearray[4] = "hidden"; ctypearray[5] = "reset"; ctypearray[6] = "submit"; ctypearray[7] = "password"; ntoit= ((0 < ctype) ? ntoit= ntoit : ntoit= ""); ntoit= ((ctype > 2) ? ntoit= "" : ntoit= ntoit); check= form.checks.value checktf= form.checks.checked check= ((ctype== 2) | (ctype== 1) ? check= check : check= "") check= (checktf== true) ? check= check : check= ""; cvalue= form.choosevalue.value; cvalue= ((cvalue== "") ? cvalue= "" : cvalue= " VALUE=\"" + cvalue + "\""); csize= form.choosesize.value; csize= ((ctype== 7) | (ctype== 0) ? csize= csize : csize= "") csize= ((csize== "") ? csize= "" : csize= " SIZE=" + csize); clength= form.chooselength.value; clength= ((clength== "") ? clength= "" : clength= " MAXLENGTH=" + clength); clength= ((ctype > 0) ? clength="" : clength= clength); whtml= form.HTML.value; ctype= " TYPE=\"" + ctypearray[ctype] + "\""; nhtml= whtml + "\r <INPUT" + check + cname + ctype + cvalue + csize + clength + ">" + ntoit + addbre; txtdsply= "Default Text" nwhtml= whtml + "\r <TEXTAREA" + cname + crows + ccols + ">" + txtdsply + "</TEXTAREA>" + addbre; nhtml= ((txtarea== 8) ? nhtml= nwhtml : nhtml= nhtml); form.HTML.value = nhtml; } function genNewPage(form) { header= "<HTML>\r<HEAD>\r<TITLE>Generated Form</TITLE>\r</HEAD>\r\r<BODY BGCOLOR=\"white\">"; newhtml= form.HTML.value; footer= "</BODY>\r</HTML>"; newpage= header + "\r\r" + newhtml + "\r\r" + footer; preWin= open("", "Preview", "width=400,height=400,status=no,toolbar=no,menubar=no"); preWin.document.open(); preWin.document.write(newpage); preWin.document.close(); } </script> <base target="leftframe"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css"> <!-- body { background-image: url(backgroundice.jpg); } --> </style></head> <body BGCOLOR="#ffffff" link="#CC0033" vlink="#333399" alink="#FF0000" <!--content start--> <p align="center"><a href="home.html" ><img src="home.jpg" width="182" height="56" /></a><a href="dates.html"><img src="dates.jpg" width="182" height="56" /></a><a href="registration.html"><img src="register.jpg" width="182" height="56" /></a><a href="about.html"><img src="aboutus.jpg" width="182" height="56" /></a><a href="yourprogram.html"/a><img src="camps.jpg" width="182" height="56" /></a></p> <table WIDTH="96%" BORDER="0" CELLSPACING="5" CELLPADDING="5"> <tr> <td WIDTH="100%"><form NAME="addform"> <p>Player Information</p> <p>Name: <input NAME="pname" TYPE="text" size="20"><br> Age: <input TYPE="text" NAME="age" size="20"><br> Last Team: <input TYPE="text" NAME="lteam" size="20"> <br> Level Played At (A1,A2,A3,C): <input TYPE="text" NAME="level" size="20"> <br> Stats: <input type = "text" NAME="stats" size="20"><br> Email: <input TYPE="text" NAME="email" size="20"> <BR> Home Phone: <input TYPE="text" NAME="homephone" size="20"> <BR> Cell Phone: <input TYPE="text" NAME="cellphone" size="20"> <BR> City of residence: <input TYPE="text" NAME="city" size="20"> <BR> Home orginization: <input TYPE="text" NAME="orginization" size="20"> <BR> What are your goals for the Upcoming Hockey Season? <p> <textarea NAME="sgoals" ROWS="10" COLS="45"></textarea> <p>Who Refered you to us? <input TYPE="text" NAME="referl" size="20"> <p>What are you hockey aspirations for the future? <p> <textarea NAME="hgoals" ROWS="10" COLS="45"></textarea> <p>How Will you be paying? (Money order, Check preferred, Paypal also Avalible. Do NOT mail an envelope full of cash!)</p> <p> <input TYPE="text" NAME="paytype" size="20"> </p> <p> </p> <p> </form> </td> </tr> </table> <!--content stop--> </body> </html> Ok, basically here is the run down of what I am looking for this script to do. Code: http://www.thisisjustanexamplesite.com/stats=XXXX-XXXX-XXXX (X's representing numbers) All I want is the webpage to just show a text field and a submit button. So when the user puts in the numbers in the text field and hits submit, it automatically will put the numbers he put into the text field on the end of that link mentioned above and then take them there. I'm thinking it should just be simple HTML but possbily PHP maybe, not sure. Any help would be appreciated! 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> Hi All, I want to autosubmit my file to google.com. Here is the code I wrote to execute it. Unfortunately output is not what is intended. I tried in IE and mozilla only. Basically I want the script to be browser independent Any help will be appreciated. Below is the code. My file name is autosub.html <HTML> <HEAD> <TITLE>My First JavaScript</TITLE> </HEAD> <BODY onload=""> <FORM NAME="search_Key" METHOD="post" ACTION="http://www.google.com" target="_top" id="search_key"> <p align="center"> Search value : <INPUT NAME="search_value" SIZE="10" MAXLENGTH="3" VALUE="spiderman"></p> <INPUT type="submit" value=Go> </FORM> <SCRIPT LANGUAGE="JAVASCRIPT" TYPE="TEXT/JAVASCRIPT"> <!-- document.write("I love JavaScript"); //--> function myautosubmit() { document.pnr_stat.submit(); document.write("I love JavaScript2"); } </SCRIPT> </BODY> </HTML> When open my autosubmit.html, browser shows "I love JavaScript2" only. Thanks in advance I need a basic form to submit for a html web page. Can you provide one with a two seperate fields, one text area, and a submit button? Thanks i have written a simple html form code the problem is that this code is working fine when run in interner explorer, if i run in mozilla firefox form reset button work as submit button it show submit validation code when reset button press, can any one help me here is the code <script type="text/javascript"> function validation() { alert("submit buton has pressed"); return true; } </script> <body> <form id="form1" name="form_feedback" method="post" onsubmit="return validation();"> <table width="488" border="0"> <!--DWLayoutTable--> <tr> <td width="85"><span>Name:</span></td> <td width="393"><input name="txt_name" type="text" id="textfield2" size="35" /></td> </tr> <tr> <td><span>Email:</span></td> <td><input name="txt_email" type="text" id="textfield3" size="35" /></td> </tr> <tr> <td><span>Address:</span></td> <td height="0"><label> <textarea name="txt_address" id="textarea" cols="45" rows="2"></textarea> </label></td> </tr> <tr> <td><span>Phone No:</span></td> <td height="0"><input name="txt_phoneno" type="text" id="textfield4" size="20" onkeypress="return numeralsOnly(event)" /></td> </tr> <tr> <td><span>Comments For:</span></td> <td height="0"><input name="txt_commentsfor" type="text" id="textfield5" size="20" /></td> </tr> <tr> <td><span>Comments:</span></td> <td height="0"><label> <textarea name="txt_comments" id="textarea2" cols="45" rows="5"></textarea> </label></td> </tr> <tr> <td height="0"><label> <input type="submit" name="btn_submit" value="Submit"/> <input type="reset" value="Reset" name="btn_reset"/> </label></td> </tr> </table> </form> </body> I am creating a website that has a search button with an image. I would like to know if there is some simple code that I can include that would display the same basic image with a different color when the user mouses over the button. Here is the code: <FORM name="searchform" onSubmit="return validateSearch();" METHOD="POST" ACTION="search_results_lt.asp"> <INPUT TYPE="text" NAME="Search" VALUE="" SIZE="20" > <INPUT TYPE=IMAGE SRC="images/search_button.gif" Name="SearchButton" Value="Submit"> </FORM> **** Thanks for your help, Robin |