HTML - Help With Form-type Code
How would I make a search-type form that would insert what the user typed in a text box into a web address and go to that address? (for example, if they type 'help' and click the submit button, it would go to the page "http://www.websitename.com/help.html") I know the general form code, but I can't figure out if I would use a tag in the 'onSubmit' portion, or use javascript, or something else altogether.
Similar TutorialsI didn't make this on frontpage. I made this through notepad. my teacher asked me to make a web page for an organization on our school's website. the whole thing is basically a form. so far i've just made the basic page without any designing yet. i'm sure i did everything correctly except for the submit button. what i want is when you click the submit button, for the browser to automatically send some sort of email to the provided address. instead, it opens up outlook. i don't want that to happen. what should i do to fix this? i will copy and paste my source code here but i will hide the email address with "*'s" just for privacy. Code: <html> <head> <title>Academy of Finance</title> </head> <body> <h1 align="center">Academy of Finance</h1> <h3 align="center">All Academy of Finance Alumni are invited to attend a reunion during the Thanksgiving weekend of 2009!</h3> <hr> <form action="mailto:********@gmail.com" method="post" enctype="text/plain"> <p> <b>Would you be interested in attending an Academy of Finance reunion Thanksgiving Weekend 2009?</b> <p> <input type="radio" name="yes" value="yes"> Yes <br> <input type="radio" name="no" value="no"> No <p> <b>Even if you answered no to this question, please fill out the following information so that we can verify that you will be unable to attend the reunion. Thank you!</b> <p> <fieldset> <legend> <b>Name:</b> </legend> <p> First Name: <input type="text" name="name" size="30"> <p> Last Name: <input type="text" name="name" size="30"> </fieldset> <p> <fieldset> <legend> <b>Address:</b> </legend> <p> City: <input type="text" name="city" size="30"> <p> State: <input type="text" name="state" size="30"> <p> Zip Code: <input type="text" name="zipcode" size="30"> </fieldset> <p> <fieldset> <legend> <b>Phone:</b> </legend> <p> Home Phone: <input type="text" name="state" size="30"> <p> Cell Phone: <input type="text" name="state" size="30"> </fieldset> <p> <fieldset> <legend> <b>Graduation Year</b> </legend> <p> Year of Graduation: <select name="year of graduation"> <option value="Select">Select</option> <option value="1990">1990</option> <option value="1991">1991</option> <option value="1992">1992</option> <option value="1993">1993</option> <option value="1994">1993</option> <option value="1995">1993</option> <option value="1996">1993</option> <option value="1997">1993</option> <option value="1998">1993</option> <option value="1999">1993</option> <option value="2000">2000</option> <option value="2001">2001</option> <option value="2002">2002</option> <option value="2003">2003</option> <option value="2004">2004</option> <option value="2005">2005</option> <option value="2006">2006</option> <option value="2007">2007</option> <option value="2008">2008</option> <option value="2009">2009</option> </select> </fieldset> <p> <fieldset> <legend> <b>Current Status</b> </legend> Current Organization: <input type="text" name="current organization" size="30"> <p> Current Occupation: <input type="text" name="current occupation" size="30"> </fieldset> <p> <fieldset> <legend> <b>College</b> </legend> College Attended: <input type="text" name="college attended" size="30"> <p> Degree Attained: <input type="text" name="degree attained" size="30"> </fieldset> <p> <fieldset> <legend> <b>Additional Comments</b> </legend> <blockquote> Additional Comments: <p> <textarea name="comments" id="comments"> </textarea> </blockquote> </fieldset> <p> <input type="submit" value="Submit"> <input type="reset" value="Clear All"> </body> </html> i really don't know what i did incorrectly. i'm not sure how i can get the submit button to send everything to my email directly without the use of any email manager. please help me out. thanks. Is this the correct code for setting an h1 tag to a specific color, bold, and centered, in an HTML4.01 transitional document? <style type="text/css"> <!-- h1 {color: #ffffff;font-weight: bold;text-align: center}--></style> Some HTML testing programs make this note: empty container element <STYLE>. I'm not sure what this means or how it applies. I apologize if I am posting this in the wrong section. I am looking for a code or script for a certain type of game but I can't even figure out what this type of game would be called. The game I am talking about is called "cryptopix" at tanga.com. I would really like to implement something like that on my website that members could create and participate in. If anyone can help point me in the right direction I would be forever grateful This is free to use: http://www.tradelinksfree.com/htmleditor.htm hey guys. I need help again! Well actually its a question But before that question - You see I play a game and in that game I want to make a list of things. Here is my noob website - http://heroonline.synthasite.com/ The Question -I guess what I'm asking is how do I post a forum directly onto a page of mywebsite with separate moderator accounts? I need forums that can be added to sites like myspace, and my website, that you post with a html code, and editable by multiply accounts? On that forum I just want one thread where i can post names of people. And I want some other people to be able to post names on that one thread. Kind of like the cbox I have on there but more like forums, and changeable by other people/accounts that i choose. Hope you guys understand what I am trying to say here... I'm a noob and i tried my best to explain. Hi guys, I'm trying to create a form which uploads an image from the user and saves it in the database. However with the code I have so far it seems the input isn't working. Any help would be appreciated. This is what I have: <html> <head><title>Store image into SQL Database</title></head> <body> PHP Code: <?php if ($_POST[submit]) { include("connect.php"); $data = addslashes(fread(fopen($_POST[form_data], "r"), filesize($_POST[form_data]))); $result=MYSQL_QUERY("INSERT INTO binary_data (description,bin_data,filename,filesize,filetype) ". "VALUES ('$_POST[form_description]','$_POST[data]','$_POST[form_data_name]','$_POST[form_data_size]','$_POST[form_data_type]')"); $id= mysql_insert_id(); MYSQL_CLOSE(); } else { ?> HTML Code: <form method="post" action="imageupload.php" enctype="multipart/form-data"> File Description:<br> <input type="text" name="form_description" size="40"> <input type="hidden" name="MAX_FILE_SIZE" value="1000000"> <br>File to upload/store in database:<br> <input type="file" name="form_data" size="40"> <p><input type="submit" name="submit" value="submit"> </form> <?php } ?> </body> </html> Hi, Below is my line of input code where I pass a certain variable. What I want to know is - is it possible to leave that 'identifer' value out of the url string if a user does not enter anything in that field? It's for a hotel reservation system and if left blank, it causes an error. It works fine is a user enters a code though. Code: <input type="text" name="identifier" value="" style="width:70px; font-size:11px;" /> Any ideas? Thanks Hello, I have a code ( see below) with a while loop that gives me a table that shows on the right side after every entry a link 'EDIT' that sends the variabe id to the script 'editjoke.php'. while ($joke = mysql_fetch_array($jokes)) { $id = $joke['id']; $joketext = htmlspecialchars($joke['joketext']); echo "<td>$joketext</td>\n"; echo "<td ><a href='editjoke.php?id=$id'>Edit</a></ td>\n"; echo "</tr>\n"; Now I created a new code with the same idea but it should have on the left side 'radio-buttons' and on the left side only one EDIT-button. Two days ago I thought it works but now it seems so that the variable is not send to editjoke.php. Here is the code: <form action="editjoke.php" method="post"> ... ... while ($num = mysql_fetch_array($number)) { //echo "<tr valign='top'>\n"; $id = $num['id']; $Auskunft = htmlspecialchars($num['Auskunft']); //echo "<td>$Auskunft</td>\n"; <input type="hidden" name="id" value="<?php echo $id; ?>" /> <input type="submit" value="SUBMIT" /> } </form> How do I have to change the code that the variable 'id' will be send to the script edithjoke.php? Any idea why the "theuploadedfile" input is not displayed when the program comes in after the submit ? PHP Code: <?php print 'Post=<pre>'; print_r($_POST);print '</pre>'; // PROBLEM $_POST['theuploadedfile'] IS NOT DISPLAYED (the text one is) ?> <form enctype="multipart/form-data" action="<?php print $_SERVER['PHP_SELF']; ?>" method="post"> <br>File to upload <input name="status" type="hidden" value="submitted"> <br>A<input name="thetexttype" type="text" size="100"> <br>B<input name="theuploadedfile" type="file" size="100" > <br><input name="submit" type="submit"> </form> I have a HTML form that truncates the action parameter after the "?" mark - which is NOT the desired behavior I am looking for. I simply want to open the referenced URL within the same viewport. Here is a representative HTML snippet: HTML Code: <form action="http://www.spufalcons.com/index.aspx?tab=gymnastics&path=gym"> <input type="submit" value="Gymnastics"/> </form> In this case, the submit button takes you to the "http://www.spufalcons.com/index.aspx" page, effectively ignoring "?tab=gymnastics&path=gym" parameter. It appears that URL's using HTML and PHP pages referenced in the action=URL work as expected BUT (alas) this is not the case when the target page contains index.aspx. This behavior is consistent across all major browsers (IE, FF, Safari, Chrome, Opera). Has anyone seen this problem before? Or can suggest an alternative and/or workaround consistent with my "pure" CSS/HTML/PHP web development approach? I have tried replacing the special characters with HTML entity values with no impact. I REALLY don't want to use abandon my CSS-styled submit buttons by using Javascript or button PNG's or image maps. Environment: Web Server: Apache 2.2.14 PHP: 5.2.10 OS: Mac OS X 10.5.8 HTML document info: HTML Code: <!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"> Conflict between Mime Type and Document Type... Morning - I have recently been learning CSS and have been upgrading my site to Semantically correct code. The first templat I am building is the following page http://www.colletts.co.uk/colletts_n...ndexflash.html and validates here validates... sort of. Should I be worried about the mime type, what effect will this have on the page. If I follow the instructions and change the file extension to xhtml all hell breaks loose - http://www.colletts.co.uk/colletts_n...dexflash.xhtml IE Error - can't open thios document etc... What am I doing wrong??? Best, Mas hi i keep getting spam from my site because their is no security on my 'comments' box. where can i find a code for putting one of those scrambled images that u have to type in that computers arent meant to be able to recognise? i dont know what to type in in google? thanks in advance Can anyone help me come up with code that will submit form results to an e-mail and then redirect to another page? However, I need all validation to go through before it re-directs. Thanks, Brandon hi, problem with my code. it does not post to the save.php, the only thing that gets posted to the php file is a ":" can someone help Code: <form method="POST" action="save.php"> <div align="center"> Username: <input type="text" name="username" size="15" /><br /> <div align="center"> Gender: <input type="gender" name="gender" size="15" /><br /> <div align="center"> E-mail: <input type="email" name="email" size="15" /><br /> <div align="center"> <p><input type="submit" value="Sign Up" /></p> </div> </form> Great forum. Hello everyone! A question about html. I have a simple html webpage where i have a list of lines 1.2.3... which when clicking one, it takes you further down the page to the apropriate box - using <A href>. So clicking on "2. Hello" takes you further down the page to the relevant box with <A name=Hello> So everytime I add something to the list, I edit the .html in notepad. Now I would like to have a form in my page which when typing in the details and clicking submit, it would add a new line at the end of the list, as well as a description below. Does anyone know a way to do this? Thanks so much! Chris Is it possible to add some form code to this javascript HTML Code: <!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Contact</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="imagetoolbar" content="no"> <meta http-equiv="imagetoolbar" content="false"> <meta name="generator" content="LMSOFT Web Creator Pro, Version:4.0.0.4"> <META NAME="KEYWORDS" CONTENT="Cleaning Contractor Cleaner Coronet Macquarie Park North Ryde Nth Ryde Epping Beecroft Carlingford Parramatta Silverwater Rose Hill"> <META NAME="DESCRIPTION" CONTENT="Coronet Cleaning Services provide a professional cleaning service for Offices, Real Estate, Clubs and Office Buildings in and around Sydney.Areas North Ryde,Maquarie Park,Epping,Beecroft,Carlingford,Parramatta,Silverwater,Rose Hill"> <META NAME="AUTHOR" CONTENT=""> <META NAME="CREATION_DATE" CONTENT=""> <META HTTP-EQUIV="CONTENT-LANGAGE" CONTENT=""> </head> <script type="text/javascript" src="./lmpres70.js"></script><noscript><br></noscript> <script type="text/javascript" src="./menumodel002.js"></script><noscript><br></noscript> <body onresize=PosPage(2,5,1.000000,1.000000); bgcolor="#ffffff" > <DIV STYLE="position:absolute; visibility:hidden; left:0; top:0; width:0; height:0;"> [<a href='./index.html'>./index.html</a>]<br> [<a href='./company.html'>./company.html</a>]<br> [<a href='./about_us.html'>./about_us.html</a>]<br> [<a href='./contact.html'>./contact.html</a>]<br> [<a href='http://www.lmsoft.com/'>Web Creator</a>] [<a href='http://www.lmsoft.com/'>LMSOFT</a>] </DIV> <DIV id=lmwcbackpanel style="visibility:visible;position:absolute;left:0;top:0;width:1280;height:800;clip:rect(0,1280,800,0);"> <DIV id=Page style="visibility:visible;overflow:hidden;position:absolute;z-index:1;left:0;top:0;"> <a name=#anchor_Page></a><IMG id=LMImagePage src="./lmimginv.gif" style="width:1280;height:800;border:0;"> </DIV> <DIV id=Img7 style="visibility:visible;overflow:hidden;position:absolute;z-index:2;left:0;top:-1;"> <a name=#anchor_Img7></a> <IMG id=LMImageImg7 src="./images/~gen_img7_10.jpg" style="width:1280;height:600;border:0;"></DIV> <DIV id=Img2 style="visibility:visible;overflow:hidden;position:absolute;z-index:3;left:71;top:90;"> <a name=#anchor_Img2></a> <IMG id=LMImageImg2 src="./images/~gen_img2_00.jpg" style="width:820;height:620;border:0;"></DIV> <DIV id=GBackground style="visibility:visible;overflow:hidden;position:absolute;z-index:4;left:0;top:0;width:0;height:0;"> <a name=#anchor_GBackground></a> </DIV> <DIV id=GLeft style="visibility:visible;overflow:hidden;position:absolute;z-index:5;left:0;top:0;width:0;height:0;"> <a name=#anchor_GLeft></a> </DIV> <DIV id=Img6 style="visibility:visible;overflow:hidden;position:absolute;z-index:6;left:86;top:118;"> <a name=#anchor_Img6></a> <IMG id=LMImageImg6 src="./images/~gen_img2_20.jpg" style="width:780;height:30;border:0;"></DIV> <DIV id=Img9 style="visibility:visible;overflow:hidden;position:absolute;z-index:8;left:524;top:118;"> <a name=#anchor_Img9></a> <IMG id=LMImageImg9 src="./images/~gen_img9_00.jpg" style="width:1;height:30;border:0;"></DIV> <DIV id=Img5 style="visibility:visible;overflow:hidden;position:absolute;z-index:9;left:306;top:118;"> <a name=#anchor_Img5></a> <IMG id=LMImageImg5 src="./images/~gen_img9_00.jpg" style="width:1;height:30;border:0;"></DIV> <DIV id=Img21 style="visibility:visible;overflow:hidden;position:absolute;z-index:10;left:195;top:118;"> <a name=#anchor_Img21></a> <IMG id=LMImageImg21 src="./images/~gen_img9_00.jpg" style="width:1;height:30;border:0;"></DIV> <DIV id=Img22 style="visibility:visible;overflow:hidden;position:absolute;z-index:11;left:415;top:118;"> <a name=#anchor_Img22></a> <IMG id=LMImageImg22 src="./images/~gen_img9_00.jpg" style="width:1;height:30;border:0;"></DIV> <DIV id=GMenu style="visibility:visible;overflow:hidden;position:absolute;z-index:12;left:0;top:0;width:0;height:0;"> <a name=#anchor_GMenu></a> </DIV> <DIV id=Text17 style="visibility:hidden;position:absolute;z-index:13;left:495;top:175;"> <a name=#anchor_Text17></a> <DIV id=LMTxtText17 style="visibility:inherit;position:relative;left:5;top:5;width:186;height:57;"> <font face='Arial'> <div align="left"><font face="Times New Roman" color="#ffffff" size="4"><span style=" font-size:14pt"><b><br /> </b></span></font></div> <div align="left"><font face="Arial" color="#ffffff" size="5"><span style=" font-size:20pt"><b> </b></span></font><font face="Arial" color="#808080" size="5"><span style=" font-size:20pt"><b>Contact</b></span></font></div> </font> </DIV> </DIV> <DIV id=Img4 style="visibility:visible;overflow:hidden;position:absolute;z-index:14;left:454;top:234;"> <a name=#anchor_Img4></a> <IMG id=LMImageImg4 src="./images/~gen_img3_00.jpg" style="width:400;height:1;border:0;"></DIV> <DIV id=GCenter style="visibility:visible;overflow:hidden;position:absolute;z-index:15;left:0;top:0;width:0;height:0;"> <a name=#anchor_GCenter></a> </DIV> <DIV id=GForm style="visibility:visible;overflow:hidden;position:absolute;z-index:16;left:0;top:0;width:0;height:0;"> <a name=#anchor_GForm></a> </DIV> <DIV id=Text1 style="visibility:hidden;position:absolute;z-index:17;left:527;top:92;"> <a name=#anchor_Text1></a> <DIV id=LMTxtText1 style="visibility:inherit;position:relative;left:15;top:15;width:349;height:53;"> <font face='Arial'> <p style="margin-left:0mm; margin-right:0mm; text-indent:0mm; margin-top:1.76mm; margin-bottom:1.76mm;"><font face="Verdana" color="#ffffff"><span style=" font-size:12pt">Call</span></font><font face="Verdana"><span style=" font-size:12pt"> </span></font><font face="Verdana" size="5"><span style=" font-size:20pt"> </span></font><font face="Arial" size="2"><span style=" font-size:10pt"> </span></font><font face="Times New Roman" color="#ffffff" size="4"><span style=" font-size:14pt">0411 590 735 or 0421 641 653</span></font></p> <div align="left"> </div> </font> </DIV> </DIV> <DIV id=Img8 style="visibility:visible;overflow:hidden;position:absolute;z-index:18;left:86;top:166;"> <a name=#anchor_Img8></a> <IMG id=LMImageImg8 src="./images/cc4.jpg" style="width:352;height:71;border:0;"></DIV> <DIV id=Img10 style="visibility:visible;overflow:hidden;position:absolute;z-index:19;left:471;top:208;"> <a name=#anchor_Img10></a> <IMG id=LMImageImg10 src="./images/cc1.jpg" style="width:31;height:17;border:0;"></DIV> <script type="text/javascript"> //LMSOFT Web Creator Pro, Version:4.0.0.4 //LMSOFT Kernel 70 var LMObjects = new Array(); var pub_home = "./index.html" var objindex=0; var Stretch=2; var Position=5; var ScaleW=1.000000; var ScaleH=1.000000; var fontbase=96.; var isdisplay=false; //--------------------------------------------------------------------------------------------- try { if(isValideBrowser(7.00,5.00)) { InitResources(); //--------------------------------------------------------------------------------------------- LMObjects[objindex++] = LMPage("Page",null,null,null,0); LMObjects[objindex++] = LMImage("Img7",1,0,null,0,null,null,null,null,0); LMObjects[objindex++] = LMImage("Img2",1,0,null,0,null,null,null,null,0); objlist = new Array(); objlist[0] = "Img7"; objlist[1] = "Img2"; LMObjects[objindex++] = LMGroup("GBackground",1,objlist); objlist = new Array(); LMObjects[objindex++] = LMGroup("GLeft",1,objlist); LMObjects[objindex++] = LMImage("Img6",1,0,null,0,null,null,null,null,0); menumodel002Show(86, 118, "GMenu2"); LMObjects[objindex++] = LMImage("Img9",1,0,null,0,null,null,null,null,0); LMObjects[objindex++] = LMImage("Img5",1,0,null,0,null,null,null,null,0); LMObjects[objindex++] = LMImage("Img21",1,0,null,0,null,null,null,null,0); LMObjects[objindex++] = LMImage("Img22",1,0,null,0,null,null,null,null,0); objlist = new Array(); objlist[0] = "Img6"; objlist[1] = "GMenu2"; objlist[2] = "Img9"; objlist[3] = "Img5"; objlist[4] = "Img21"; objlist[5] = "Img22"; LMObjects[objindex++] = LMGroup("GMenu",1,objlist); branchlist = new Array(); LMObjects[objindex++] = LMText("Text17",1,0,null,0,null,branchlist,null,null,5,5,5,5); LMObjects[objindex++] = LMImage("Img4",1,0,null,0,null,null,null,null,0); objlist = new Array(); objlist[0] = "Text17"; objlist[1] = "Img4"; LMObjects[objindex++] = LMGroup("GCenter",1,objlist); objlist = new Array(); LMObjects[objindex++] = LMGroup("GForm",1,objlist); branchlist = new Array(); LMObjects[objindex++] = LMText("Text1",1,0,null,0,null,branchlist,null,null,15,15,15,15); LMObjects[objindex++] = LMImage("Img8",1,0,null,0,null,null,null,null,0); LMObjects[objindex++] = LMImage("Img10",1,0,null,0,null,null,null,null,0); //--------------------------------------------------------------------------------------------- } }catch(e) { alert(e.message); } SetBaseColor(0x3f0,0x3f0,0x7a); if(isdisplay==true) GetDisplayInfo("","",0,"","./"); else LMObjectAnimate(Stretch,Position,ScaleW,ScaleH); </script><noscript><br></noscript> </DIV> </body> </html> How do I make a blank text field where people can type in their e-mail and press submit and then that gets emailed to me? I have this code: <FORM method="post" name="newsletter" action="http://formmail.dreamhost.com/cgi-bin/formmail.cgi" enctype="multipart/form-data"> <INPUT type=text name="email" value="Type Here" size=15 AUTOCOMPLETE=ON> <INPUT TYPE="image" src="http://www.averytrips.com/submit.jpg" alt="Submit"> </FORM> It's supposed to be e-mailed to newsletter@averytickets.com. I put in the CGI action that dreamhost gave to me, but I don't know how to point it towards newsletter@averytickets.com. Any help is much appreciated, thanks! I have been trying to remove it for the next 2 hours, removing, adding and all kinds of stuff. I don't know where I am going wrong could any of you point me in the right direction please. The image below shows what I want to do. Here is the uploaded template. If you do not wish to download this I can always copy paste the html and post in a comment or PM. http://www.box.net/shared/hiixy2o64r Thanks in advance. Hello I've searched the web for a simple form code that has a "submit" button, so that when a user clicks it I will receive an email with the submitted data - but - I want the user to click "submit" without being transferred to his default email program. I want him only to enter the data and when he presses the button, the data will be sent to my email. I want to put this code in a blog that supports HTML. What code can I use for it? I hope I made my question clear. I will really be happy to receive your help. Thank you very much. |