HTML - Multiple Submition Form
I have been trying this all day all I get is the easy %50 done... and I can't figure out the second form.
I want the first button to use the entire form to register, and it does.. I want the second button, to just take the first input field, throw the text in there at the end of a specific url, and bring me to that page. Why is this so hard? HTML Code: <form name="trnyjump" method="post"> <input type="hidden" value="ppg" name="path"><input type="hidden" value="1" name="readrules"> <table width="220" border="0" align="center"> <TR BGCOLOR="#000000"><TD colspan="2" ALIGN="LEFT"><FONT FACE="TAHOMA" SIZE="2" COLOR="#FFFFFF">ENTER TOURNEY</FONT></TD></TR> <TR BGCOLOR="#000000"><TD WIDTH="40%" ALIGN="LEFT"><FONT FACE="TAHOMA" SIZE="2" COLOR="#FFFFFF">JUMP = </FONT></TD><TD WIDTH="60%" ALIGN="LEFT"><input type="text" SIZE="10" name="tcount" value=""></TD></TR> <TR BGCOLOR="#000000"><TD WIDTH="40%" ALIGN="LEFT"><FONT FACE="TAHOMA" SIZE="2" COLOR="#FFFFFF">NAME = </FONT></TD><TD WIDTH="60%" ALIGN="LEFT"><input type="text" name="name" SIZE="10" value=""></TD></TR> <TR BGCOLOR="#000000"><TD WIDTH="40%" ALIGN="LEFT"><FONT FACE="TAHOMA" SIZE="2" COLOR="#FFFFFF">PASSWORD = </FONT></TD><TD WIDTH="60%" ALIGN="LEFT"><input type="password" name="playerpass" SIZE="10" value=""></TD></TR> <TR><TD WIDTH="100%" colspan="2" ALIGN="LEFT"> <!-- mmmmm buttons --> <INPUT type="button" value="Register" name=Register onclick="return OnRegister();"> <INPUT type="button" value="View" name=View onSubmit="return OnView" action="/"> </form> </TD></Tr> <script language="Javascript"> function OnRegister() { document.trnyjump.action = "http://cgi4.igl.net/tourneysystem/register.php" document.trnyjump.target = "_blank"; // Open in a new window document.trnyjump.submit(); // Submit the page return true; } </script> <script> function OnView { document.trnyjump.action = ("http://cgi4.igl.net/tourney/ppg/" +form.tcount.value+ "/"); document.trnyjump.action = "_blank"; document.trnyjump.submit(); return true; } </script> I have also tried this for the second button... HTML Code: <script> function Ontcount(form) { if (form.trn.value) { var OpenWindow=window.open ("http://cgi4.igl.net/tourney/ppg/" +form.trn.value+ "/"); } return false; } </script> These may not look like they work right now because I have changed them so much thay may not be exactly what I am using... is there anybody here who can tell me how to get this to work. Similar Tutorialshi there, i have an idea for a website but the main function of the site will be for the visitor to send me info though a feedback form. The form will have text feilds and i also want pictures to come with the text and a payment will also need to be taken from the visitor. can anyone advise me on the best way i can do this. I will be using html code to make the site many thanks all Hi there, we got a request that when we submit a registration form on html we need to store the data in SQL Db and send an a email. i know how to do in asp.net.but the current website is already in HTML so please kindly give your advices. thanks, Nagaraju. Hi there I checked through a bunch of this forum but I can't find anything on this topic. If it's already been addressed, I'd be thankful if you could point me to the thread. If not, this is my problem.... I need to have 2 drop down menus in the same form, so that when the user clicks submit (OK in this case) both selected fields are posted.... Code: <form method="post" action="show.html"> <table> <tr> <td>Select a color</td> <td><select name=color"> <option value="red">red</option> <option value="green">green</option> <option value="yellow">yellow</option> <option value="orange">orange</option> <option value="purple">purple</option> <option value="blue">blue</option> </select> </td> </tr> <tr> <td>Select a shape</td> <td><select name=shape"> <option value="circle">circle</option> <option value="square">square</option> <option value="triangle">triangle</option> <option value="hexagon">hexagon</option> </select> </td> </tr> <tr> <td><input type="submit" value=" OK "></td> </tr> </table> </form> This code displays the drop downs perfectly but only the color is being posted to show.html It's something small but I can't figure this one out. I'm not sure if you can even have 2 drop downs with 1 submit button. Any and all assistance is greatly appreciated! Perkie I am trying to create a FORM with multiple option radio buttons. Basically this is a ready script I found on the internet. I have tried to customize it but there is a slight problem which I have been unable to fix after a lot of tries. In the below code, I am trying to open the following URLs on submit. http://www.pixmac.com/pictures/"searchterms"?a=kcalpesh http://www.crestock.com/image-keyword/"searchterms".aspx/112582/ In both the URLs the "searchterms" is dynamic and will be picked from the input box present in the form. PROBLEM PART! On submission, the URL that opens is only up to http://www.pixmac.com/pictures/"searchterms" and the affiliate ID after that gets missed. Same with the other URL on submission, the URL that opens is http://www.crestock.com/image-keyword/"searchterms" and again the affiliate ID gets missed out. Below is the complete page code for the FORM. Any help will be highly appreciated. I am not a coder and have very limited knowledge of HTML / Javascript!! <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Untitled Document</title> <script type="text/javascript"> function dosearch() { var sf=document.searchform; var submitto = sf.sengines.options[sf.sengines.selectedIndex].value + escape(sf.searchterms.value); window.open(submitto); return false; } </script> </head> <body> <form name="searchform" onsubmit="dosearch();"> Search: <select name="sengines"> <option value="http://www.pixmac.com/pictures/"searchterms"?a=kcalpesh" selected="selected">Pixmac</option> <option value="http://www.crestock.com/image-keyword/"searchterms".aspx/112582/">Crestock</option> </select> For: <input name="searchterms" type="text"> <input name="SearchSubmit" value="Search" type="submit"> </form> </body> </html> Is there any way to limit the selection form a multiple select box to a certain number. <select multiple="multiple" size="5"> <option>Beer</option> <option>Vodka</option> <option>Guinness</option> <option>Sambuca</option> </select> How can I stop people selecting more than 2 options? Cheers in advance for the help. Hello All, I'm creating a form which has got several parts, divided by tables, which are radio buttons, check boxes etc. All the radio button tables work well with the exception of one where it lets you choose all three options or two, as if they were checkboxes. The code is: PHP Code: <div class="roundedcornrboxorange"> <div class="roundedcornrtoporange"><div></div></div> <div class="roundedcornrcontentorange"> <table width="100%"> <tr> <td colspan="3"><h3>Which level do you think you're currently are?</h3></td> </tr> <tr> <td width="30%"><input type="radio" name="level[beginner]" id="beginner" value="1"/> Beginner</td> <td width="30%"><input type="radio" name="level[intermediate]" id="intermediate" value="1"/> Intermediate</td> <td width="30%"><input type="radio" name="level[advanced]" id="advanced" value="1"/> Advanced</td> </tr> </table> </div> <div class="roundedcornrbottomorange"><div></div></div> </div> Does anyone have an idea what could be going wrong? The css (in case it helps) is: PHP Code: .roundedcornrboxorange { margin: 5px 0 0 0; width: 800px; clear: both; background: #ff7b06 url(../images/roundedcornr190406grad.gif) repeat-x top left; } .roundedcornrtoporange div { background: url(../images/roundedcornr190406tl.gif) no-repeat top left; } .roundedcornrtoporange { background: transparent url(../images/roundedcornr190406tr.gif) no-repeat top right; } .roundedcornrbottomorange div { background: url(../images/roundedcornr190406bl.gif) no-repeat bottom left; } .roundedcornrbottomorange { background: transparent url(../images/roundedcornr190406br.gif) no-repeat bottom right; } .roundedcornrtoporange div, .roundedcornrtoporange, .roundedcornrbottomorange div, .roundedcornrbottomorange { width: 100%; height: 10px; font-size: 1px; } .roundedcornrcontentorange { margin: 0 10px; } Many thanks in advance I am trying to create a form in HTML that will allow the user to select a department from a drop down and also enter their email address. on submit the form will be sent to the email address corresponding to the department as well as sending the user a copy of the form(the email address they entered manually). This code only sends the form to Dept1 & Dept2. If I move the "email_count" input field before "name1" then it sends the user email and the Dept1 email only. This works great if they select Dept1 each time, not so much if a different department is chosen. Any help would be great! I don't have access to the cgi code. Here is what I have so far: <form action="http://intranet/cgi-bin/genemail.cgi" method="POST" enctype="x-www-form-encoded" class="body" name="theform" onSubmit="return formCheck()"> <input type="hidden" name="FORM" value="IDEA Form"> <input type="hidden" name="sendto" value="MORE_EMAIL"> <input type="hidden" name="name1" value="Dept1"> <input type="hidden" name="email1" value="Dept1@email.com"> <input type="hidden" name="name2" value="Dept2"> <input type="hidden" name="email2" value="Dept2@email.com"> <input type="hidden" name="name3" value="Dept3"> <input type="hidden" name="email3" value="Dept3@email.com"> <input type="hidden" name="name4" value="Dept4"> <input type="hidden" name="email4" value="Dept4@email.com"> <input type="hidden" name="email_count" value="2"><!--for email to submitter--> Here is the option box: <select name="name_choice"> <option selected>Dept1</option> <option>Dept2</option> <option>Dept3</option> <option>Dept4</option> </select> Here is the text box that the user will enter their email address: <input name="email5" type="text" value="first.last@email.com" size="50" id="UserEmail"> Here is my submit code; <input type="submit" name="Submit" value="Submit"> I hope I've posted this in the right place, apologies in advance if I haven't. I'm trying to post multiple XML files using a HTML form. The code I'm using is below and although I am able to select multiple files in Mozilla Firefox it is only ever successfully uploading one file. I need to be able to post 100s of XMLs in a single post, as well as receiving the responses for all uploaded files. I have no experience in this type of thing before, is someone able to assist me and am I even on the right track? Heeelp! <h2>Upload</h2> <form ENCTYPE="multipart/form-data" action="https://asp.test.com.au/ttms/sandbox/ws/external/public/client-profile-xml/multi/receiver" method="POST"> <input type="file" name="linkfile" multiple="multiple"> <br/> <input type="submit"> </form> Please help. This is what I have so far http://bartletagency.com/m/x2.php Now, obviously with business cards there many different options. I need something to calculate on the side the total after picking each drop box option, or if easier, after hitting "calculate total." (preferably with the numbers in a table so I can make it appear by itself right underwear the send button) . Example: 1000 business cards in blue, say, would need to come up at 50 dollars if they pick 3-1, but if they pick 3-22 it needs to come up 60 dollars if they pick the other color, green, and pick 3-1, the label would need to turn to $55.00, if they pick 3-2 with the color green the label would need to say $65.00 how can i do this please? here is the code I have which made up the PHP file i linked you to above. code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <html> <head> <title>Lesson 3</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <?php if ($_SERVER['REQUEST_METHOD'] != 'POST'){ $me = $_SERVER['PHP_SELF']; ?> <h1 align="center">Business Cards</h1> <form name="form1" method="post" action="<?=$me?>"> <table border="0" align="center" cellpadding="5" cellspacing="0"> <tr> <td align="right" valign="middle">Quantity:</td> <td><select name="Quantity: "> <option value="1000">1000</option> <option value="2500">2500</option> <option value="5000">5000</option> <option value="10,000">10,000</option> </select> </td> </tr> <tr> <td align="right" valign="middle">color</td> <td><select name="color"> <option value="blue">blue</option> <option value="green">green</option> </select> </td> </tr> <tr> <td align="right" valign="middle">3</td> <td><select name="3"> <option value="small">3-1</option> <option value="medium">3-2</option> </select> </td> </tr> <tr> <td> </td> <td><input type="submit" name="Submit" value="Send"> </td> </tr> </table> </form> <?php } else { error_reporting(0); // initialize a array to //hold any errors we encounter $errors = array(); // test to see if the form was actually // posted from our form $page = $_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']; if (!ereg($page, $_SERVER['HTTP_REFERER'])) $errors[] = "Invalid referer<br>\n"; // check to see if a name was entered if (count($errors)>0) { foreach($errors as $err) echo "$err<br>\n"; echo "<br>Please use your browser's Back button to fix."; } else { // no errors, so we build our message switch($_POST['color']){ case 'red': $recipient = 'mathew420@gmail.com'; break; case 'green': $recipient = 'mathew420@gmail.com'; break; case 'blue': $recipient = 'mathew420@gmail.com'; break; default: $recipient = 'mathew420@gmail.com'; } $subject = "Widget On Line Order"; $from = stripslashes($_POST['Name']); $msg = "Message sent by $from\n"; $msg.="\nSize: ".$_POST['size']; $options=$_POST['options']; $msg.="\nOptions:"; if ($options) for ($i=0;$i<count($options);$i++) $msg.= "\n- $options[$i]"; else $msg.="\n- None"; $msg.="\nColor: ".$_POST['color']; $extension=($_POST['extension'])?"Extension: Yes":"Extension: No"; $wallmount=($_POST['wallmount'])?"Wallmount: Yes":"Wallmount: No"; $deskmount=($_POST['deskmount'])?"Deskmount: Yes":"Deskmount: No"; $msg.="\n$extension\n$wallmount\n$deskmount"; $msg.="\n".stripslashes($_POST['MsgBody'])."\n"; if (mail($recipient,$subject,$msg)){ echo "<p>Thanks for your order!</p>"; echo nl2br($msg); } else echo "An unknown error occurred."; } } ?> </body> </html> thanks so much Hey guys and thanks in advanced for helpin' me out with this one. Anyways, I'm building a sort of "Advanced" search functionality. I want to give the user the ability to select multiple checkboxes in different categories (forms) but to be able to account for each checkbox even though they are in different forms. For example a Newspaper might have a search for an article by: Code: <FORM>(form name = "formONE") Paper Type Weekly [] Daily [x] Monthly [] {SUBMIT BUTTON} </ FORM> <FORM> (form name = "formTWO") Location Upper East [] Null County [] Down South [x] {SUBMIT BUTTON} </ FORM> <FORM> (form name = "formTHREE") Article Section Lifestyle [] Sports [x] Weather [] Finances [] {SUBMIT BUTTON} </ FORM> SO looking at the above...If the user "checked" (I placed 'x' in there) those boxes...and clicked ANY of the submit buttons, I want to be able to pull-in EACH of the checked items from ALL THREE of the forms. What is happening now with my code, is I'm only getting the results for the form which I clicked the 'submit' button in. I know you might ask, "why not just put them in one form?"... but I have them in separate forms because I want the user to have the ability to "CHECK/UNCHECK ALL" for each category (i.e. Paper Type, Location, Article Section...) Is it as easy as just wrapping all of those forms in one GIANT form, and supply each submit button with the name of that GIANT form? I hope this makes sense, and let me know if you need anything else at all...it's the last piece of this search and I just want to get it out of the waY!! Thanks guys! script completed, thx Hi all, I have a simple newsletter form, so just the email field and a submit, what I would like to do is to send this data to a larger subscriber form, so one that has name, email (with the data previously entered already added), list to subscribe to etc. Can this be done? Thanks 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 have a loop that extracts data out of the database and outputs a dropdown form with each line with options for the user. I have included an onChange = "this.form.submit();" for each dropdown. This works fine in Firefox, but does not work so well in Internet Explorer(yes, scripting is enabled). Here's the code: <form method="post" action="some.php"> <input type = "hidden" name ="variable1" value ="'.$variable1.'"' /> <input type = "hidden" name ="variable2" value ="'.$variable2.'"' /> <select name = "'.$variable1.$variable2" onChange = "this.form.submit();"> <option value = "option_1"> Option 1</option> <option value = "option_2"> Option 2</option> <option value = "option_3"> Option 3</option> <option value = "option_4"> Option 4</option> </form> This code is then just echo'd for each line. $variable 1 and $variable2 are unique, so to name each form differently I just give combine the two for a unique name I can call at some.php. Symptoms: In Mozilla this works great. With IE(both 6 and 7) the variable1 and variable 2 are passed along, however option_1(the 1st default option displayed) is always passed along except for the last one of my list. The last one of the list always passes along the correct the correct value. So if I had two outputs A and B,and I selected Option2 for each of them...then A would send Option1 but B would send the selected Option2. When designing a webpage is there a way to see the correct multiple choice answer using firebug or some like extension. Does anybody know if it is possible to have multiple legends on the same fieldset? Here's an example of what I trying to do: Code: <legend align="left">pre</legend> <legend align="center"><u>Creating $sName</u></legend> <legend align="right">next</legend> With the above code I get the "pre" in the fieldset lines but the others inside. I've attached a picture of what I am trying to achieve. I've had a search on the old goggle pages and this forum but nothing has really turned up. Does anyone know if this is possible? And if so how? Much thanks for any replies I am making a simple webpage with a menubar (pictures as navigation) and an iframe. I want the pictures in the navigation bar to open different external webpages in the iframe. Now the problem is that these three pictures (blog, works, contact) are linked with href to a javascript because of the image swap effect. (i.e href=javascript:staySet). How do I make them open pages in the iframe when they already have a href value? The page can be viewed he http://stereocilia.net/ This is what I have so far: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- saved from url=(0014)about:internet --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Test</title> <style type="text/css"> html, body, div, iframe { margin:0; padding:0; height:100%; } iframe { display:block; width:100%; border:none; } </style> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <style type="text/css"> td img { display: block; text-align: center; } body,td,th { color: #000; } body { background-image: url(http://www.stereocilia.net/background.jpg); background-repeat: no-repeat; background-color: #eeeeee; } </style> <Script Language=JavaScript> var prevClicked = ""; function staySet(curr){ tmpStr = curr.toString(); if (prevClicked != "") { document.getElementById(prevClicked).disabled = false; document.getElementById(prevClicked).src = prevClicked+'1.png' } document.getElementById(tmpStr).disabled = true; document.getElementById(tmpStr).src = tmpStr+'2.png'; prevClicked = tmpStr; } </Script> </head> <body bgcolor="#ffffff" leftmargin="0px" topmargin="0px" marginwidth="0px" marginheight="0px"> <div align="center"><table border="0" bordercolor="" width="100%" cellpadding="0" cellspacing="0"> <tr> <td><div align="center"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr style="background-color:#121616"> <th scope="col"><table style="display: inline-table;" border="0" cellpadding="0" cellspacing="0" width="546"> <!-- fwtable fwsrc="Untitled" fwpage="Page 1" fwbase="ina.png" fwstyle="Dreamweaver" fwdocid = "592585180" fwnested="0" --> <tr> <td><img src="ina_spacer.gif" width="214" height="1" border="0" alt="" /></td> <td><img src="ina_spacer.gif" width="110" height="1" border="0" alt="" /></td> <td><img src="ina_spacer.gif" width="110" height="1" border="0" alt="" /></td> <td><img src="ina_spacer.gif" width="110" height="1" border="0" alt="" /></td> <td><img src="ina_spacer.gif" width="2" height="1" border="0" alt="" /></td> <td><img src="ina_spacer.gif" width="1" height="1" border="0" alt="" /></td> </tr> <tr> <td colspan="5"></a></td> <td><img src="spacer.gif" width="1" height="100" border="0" alt="" /></td> </tr> </table></th> </tr> </table> </div></td> </tr> <tr> <td><div align="center"> <table style="display: inline-table;" border="0" cellpadding="0" cellspacing="0" width="546"> <tr> <td><img src="ina_blank.png"/></td> <td><a href=javascript:staySet('A')><img src='A1.png' border="0px" id='A' onMouseover="SwapImage('A')" onMouseout="SwapImage('A')"></a> </td> <td><a href=javascript:staySet('B')><img src='B1.png' border="0px" id='B' onMouseover="SwapImage('B')" onMouseout="SwapImage('B')"></a> </td> <td><a href=javascript:staySet('C')><img src='C1.png' border="0px" id='C' onMouseover="SwapImage('C')" onMouseout="SwapImage('C')"></a> </td> <td valign="top"><p style="margin:0px"></p></td> <td><img src="ina_spacer.gif" width="1" height="1" border="0" alt="" /></td> </tr> </table> </div></td> </tr> </table> <iframe name="iframe" width="100%" height="100%" src="http://www.htmlforums.com/" frameborder="0" scrolling="yes" > </iframe> </iframe> </div> </body> </html> Ok I'm really new to this so bear with me.. I just started my file hosting website, and I have a ****ton of videos.. I really don't want to create thousands of individual pages so that users could view the videos. Is there a simple way to view each video in a page with my logo on top, tabs on the side, etc. without creating tons of individual pages? (NSFW!) ex: - family unfriendly link removed - Total beginner here so please treate me gently... I have just written my 1st bit of html, using frameset and tables. All has worked ok, nothing grand, just 3 frames. Frame19(name="banner") is like an address banner, frame2("nav") is a navigation bar using a table and frame3("main") being like a main page which changes dependent on the navigation bar cell chosen. I've used href to navigate with which is working fine when only one action is required but I can't seem to get two actions to work, ie selecting in the navigation frame changes the other two frames. Have tried several variations of multiple href's but never get anywhere, expect it's syntax but stuck now. Ideally I want to select within the nav frame which then updates the banner and main frames, is this possible? bit of nav.htm I'm using: <tr> <td><font color="#000000" face="Calibri" size="3"><a href="Smain.htm" target="main">Scouts </a></font> </td> </tr> Thanks for any help Hi I searched through threads to make sure this topic is not posted before but I couldn't find any. I want to put several tables in one page with horizontal line in between them. however, after I post it on the website the tables are stuck together with no space. basically the order is messed up. Is there anyway I can get the format right? Thanks |