HTML - Newbie Question: Changing Search Urls Using Radio Buttons
Hi everyone, I'm a total newbie and have zero previous HTML experience (but have experience reading code). I am modifying a site to support 3 radio buttons that switch the function of a single search bar. Could you guys please help me figure this out? Warning - all of this is copy-and-paste frankencode from the source, pieced together by guesswork. It may hurt your eyes. In case you're wondering, this is simply a design prototype for a class I am taking that requires user testing. The actual web development will be done by someone else if accepted. I will learn HTML properly later on.
Attached is an image of what I am thinking of. And here is the pertinent code: Code: <h2>Select the search engine that meets your needs.</h2> <form id="form1" name="form1" method="post" action=""> <p> <label> <input name="searchEngineSelection" type="radio" id="searchEngineSelection_0" value="http://uci.worldcat.org/search" checked="checked" /> <strong>Melvyl</strong></label> - Search libraries worldwide for books/music/other media.<br /> <label> <input name="searchEngineSelection" type="radio" id="searchEngineSelection_1" value="http://antpac.lib.uci.edu/search/X?SEARCH=" /> <strong>ANTPAC</strong></label> - Search and reserve material held at UCI Libraries.<br /> <label> <input type="radio" name="searchEngineSelection" value="http://www.lib.uci.edu/search-site.html?cx=009602760963559712792%3Aoglsjsxdz5m&cof=FORID%3A10&ie=UTF-8&q=" id="searchEngineSelection_2" /> <strong>Site</strong></label> - Find a specific page or information on the Library website.<br /> </p> </form> <form accept-charset="UTF-8" action="http://uci.worldcat.org/search" id="wcfw" method="get" name="wcfw" target="_top"> <input name="q" type="text" id="quicksearch_field" /> <input align="top" id="quicksearch_go" onmouseout="goBtnOff()" onmouseover="goBtnOn()" src="./Home Page - UCI Libraries_files/button-go-off.gif" type="image" /> </form> I have no idea how to do it so I am asking you gurus to help. Thanks so much for your time. Similar TutorialsThe tutorial on how to make a search form with multiple search options was excellent! http://www.mediacollege.com/internet...ti-search.html However, is it possible to use radio buttons instead of a drop-down list? Can someone be kind enough to show me the code for it? Million thanks. I have a webpage with a button to submit a form to a location, however I would like to be able to make this button send to as many different urls as I specify? Sorry if this doesnt make any sense, but any help is appreciated. Thank you. hello, sometimes I see the following urls in some websites. Instead of seeing webpages extensions, I see the folders. http://www.example.com/en/services/ What's inside this folder ? How does it work ? thanks i have my list of radio buttons and submit button but what i would like to do is have each one go to a different URL but im having trouble with that at the moment so if anyone could help it would be very appreciated. thankyou hello, i just start working on a site, and i have a question. i have 2 radio buttons and a normal button, and i want it to make when i check the first radio button and click on the button it will go to site1.html and if i check the second radio button, and then the normal button it needs to go to site2.html, how do i do that? this is what i have atm: Quote: <form name="form1" method="post" action=""> <p> </p> <FORM name ="form1" method ="post" action ="radioButton.php"> <p> <Input type = 'Radio' Name ='catogorie' value= 'school' > School </p> <p> <Input Name ='catogorie' type = 'Radio' value= 'own' > My Own </p> <P> <Input type = "Submit" Name = "Submit1" VALUE = "Volgende"> Hello there! I'm new to this forum and a definite NEWBIE but am doing my best to learn. I am making a form in which I have several categories that are chosen by clicking on radio buttons. The problem is that I must have coded this incorrectly because you can ONLY click on ONE radio button, even thought there are 7 different subcategories. I'd like to be able to click on one radio button for each of the different subcategories. Any advice would be GREATLY appreciated!!! Hi, I am trying to do this: Have 3 Radio Buttons (I think thats what they are called), Like this: 0 0 0 28K 56K Broadband Play (Button) And when you press any of the buttons the right stream is played via a url from another site I have. How to I go about doing this, ? I see aol has similiar feature for downloading files which I liked the look of, pass some time and help me out. I have found these sample html codes but I think these are lacking. I am just a newbie but I know how to trace html codes. <FORM ACTION="../cgi-bin/mycgi.pl"> What size pizza?<P> <INPUT TYPE=RADIO NAME="pizzasize" VALUE="S">small<BR> <INPUT TYPE=RADIO NAME="pizzasize" VALUE="M">medium<BR> <INPUT TYPE=RADIO NAME="pizzasize" VALUE="L">large<P> <INPUT TYPE=SUBMIT VALUE="submit"> </FORM> Thanks, Magiclouie I have a list of with radio buttons... allowing you to choose from 1-5. It's a HUGE list... so I want to pre select the second (#2) radio button for every question. I used the "checked" command but if I change it to a 1 and save and close, when I go back into it, it defaults back to #2. It is only doing this if I select #1... #3,4,5 stays... how do I fix this? <tr> <td>A-1</td> <td>Question #1</td> <td><input type="radio" name="A1_1" id="A1_1_1" value="1" mapname="A1_1" runat="Server"></td> <td><input type="radio" name="A1_1" id="A1_1_2" value="2" mapname="A1_1" runat="Server" checked></td> <td><input type="radio" name="A1_1" id="A1_1_3" value="3" mapname="A1_1" runat="Server"></td> <td><input type="radio" name="A1_1" id="A1_1_4" value="4" mapname="A1_1" runat="Server"></td> <td><input type="radio" name="A1_1" id="A1_1_5" value="5" mapname="A1_1" runat="Server"></td> </tr> Please put an old man out of his mysery I am developing a stand alone 'kiosk' application, it only needs to work in IE 6/7 Why does the page not follow the tabindex order for form radio buttons? It only ever seems to tab between 'checked' buttons - I can not tab to unchecked items. Take a look at http://www.thad.entadsl.com/feedback/feed.php to see what I mean. (ignore layout its a work in progress) Why? How to change this table Code: <SELECT id=SelectPeriod style="FONT-SIZE: 11px; WIDTH: 250px; FONT-FAMILY: Tahoma;background:#cccccc;" onfocus="SetVisibility(Find('TrPrice'), 0);" name=SelectPeriod> <OPTION value="" selected dOption="">Избери</OPTION> <OPTION value="1" dOption="100">Да</OPTION> <OPTION value="2" dOption="4">Не</OPTION> </SELECT> to radio buttons I'm new to the forum and have a question about radio buttons. I think I'm under the right category. I already know how to create the radio buttons and have done that on my site. Where my problem comes in is once a radio button is clicked on. I want to make a trivia page on my site with a multiple choice answers, which means only one answer is correct and the other four options would be wrong. If the correct answer is chosen, I want a page to pop-up or a new page which would let the person know they chose correctly. I also want to do the same for the wrong answers with a pop-up or new page letting the person know they chose wrong if they clicked on any other answer except the correct one. I don't even know if this can be done. I've looked on website help pages and it seems they all differ so I'm getting more confused with each search. Some say to use CSS others say JavaScript. Maybe another way would be better than radio buttons. I'm up for any suggestions. The link to my page for reference is http://wondersofdisney.webs.com/trivia.htm . The page is not visible on my website yet because it is still in construction. If you need any further explanations, please don't hesitate to ask me and I'll try to clear it up. Thanks for any help provided! Hi All, Using Dreamweaver CS4. I'm creating a form to file webpage for my work. It's just a simple html form that a user can fill out and once they hit submit, the information is saved to a file to be later converted to a spreadsheet or database or whatever. I have several required fields on this form. I was instructed to add a "." after the "Name" of whatever field I am requiring. They all work except my Radio buttons. Regardless if I make a selection (Yes or No) and hit submit, it still says that I need to fill out this field. Here is my code, I have tried several varieties of it, but none seem to work. I am completely new to Html coding so please bear with me. Thank you in advance! <input type="hidden" name="RequireApprovalYesNo." id="RequireApprovalYesNo." value=""> <input type="radio" name="RequireApprovalYesNo." id="RequireApprovalYesNo." value="Yes">Yes <input type="radio" name="RequireApprovalYesNo." id="RequireApprovalYesNo." value="No">No I have also tried (without the "." in the second and third piece of code): <input type="hidden" name="RequireApprovalYesNo." id="RequireApprovalYesNo." value=""> <input type="radio" name="RequireApprovalYesNo" id="RequireApprovalYesNo." value="Yes">Yes <input type="radio" name="RequireApprovalYesNo" id="RequireApprovalYesNo." value="No">No Take a look at this piece of code: Code: <div style="padding-bottom: 10px;">Sex:<input type="radio" value="female" name="sex"/>Female<input type="radio" value="male" name="sex"/>Male<input type="radio" value="na" name="sex"/>Prefer not to say</div> This is what it gives me: I'd like all the radio buttons to be on the SAME line (ONLY for this particular example though: I want the rest of my radio buttons on my form to stay on different lines). Hi there, The following code is called upon the user hitting a submit button and checks that: 1. two drop downs have a response 2. five different groups of radio button each have a response. I have two problems: 1. The first bit of code for the drop downs works, but then seems to ignore the validation code for the radio buttons. 2. The code for the radio buttons repeats five times and each time the only thing that changes is the name of the radio button group (Field23, Field29, etc) and the error message. I cannot seem to find a nice, efficient way of creating a loop that eliminates the clutter I would really appreciate any help with these two problems. Cheers, Adrian Code: <script type="text/javascript" language="JavaScript"> //Ensure that every question is answered, otherwise alert an error function checkAnswers() { var questions = ['Field35', 'Field33']; var errorMessage = ['Please indicate the country where you live.', 'Please indicate your age.']; var i = 0; for (i = 0; i < questions.length; i++) { var response = window.document.getElementById(questions[i]).value; if (response == null || response == "") { alert(errorMessage[i]); return false; } } // set var radio_choice to false var radio_choice = false; // Loop from zero to the one minus the number of radio button selections for (counter = 0; counter < form1.Field23.length; counter++) { // If a radio button has been selected it will return true // (If not it will return false) if (form1.Field23[counter].checked) radio_choice = true; } if (!radio_choice) { // If there were no selections made display an alert box alert("Please select a gender.") return (false); } // set var radio_choice to false var radio_choice = false; // Loop from zero to the one minus the number of radio button selections for (counter = 0; counter < form1.Field29.length; counter++) { // If a radio button has been selected it will return true // (If not it will return false) if (form1.Field29[counter].checked) radio_choice = true; } if (!radio_choice) { // If there were no selections made display an alert box alert("Please indicate your level of education.") return (false); } // set var radio_choice to false var radio_choice = false; // Loop from zero to the one minus the number of radio button selections for (counter = 0; counter < form1.Field27.length; counter++) { // If a radio button has been selected it will return true // (If not it will return false) if (form1.Field27[counter].checked) radio_choice = true; } if (!radio_choice) { // If there were no selections made display an alert box alert("Please indicate your employment status.") return (false); } // set var radio_choice to false var radio_choice = false; // Loop from zero to the one minus the number of radio button selections for (counter = 0; counter < form1.Field25.length; counter++) { // If a radio button has been selected it will return true // (If not it will return false) if (form1.Field25[counter].checked) radio_choice = true; } if (!radio_choice) { // If there were no selections made display an alert box alert("Please indicate your marital status.") return (false); } // set var radio_choice to false var radio_choice = false; // Loop from zero to the one minus the number of radio button selections for (counter = 0; counter < form1.Field31.length; counter++) { // If a radio button has been selected it will return true // (If not it will return false) if (form1.Field31[counter].checked) radio_choice = true; } if (!radio_choice) { // If there were no selections made display an alert box alert("Please indicate your income.") return (false); } return (true); } </script> Hey, I'm trying create a form that contains two radio buttons and a text box and a submit button. Depending on which radio button is selected, a search is done on the keyword. One of the buttons is for a google search and the other is for an internal site I am working with. The problem I am running into is that the 'method' attribute in my form has to equal both "get" and "post", depending on what I select. I've tried a few things using scripts but nothing successful. Any help would be great. Thanks Hi I'm trying to add an update profile page on my site and am uploading the details from a database. I want to display the details in a form where there will have the option to click an update button the problem is: i have a radio button where I want it to automatically show the current sex of the member, but how to I determine which box to check and which one to leave? the sex is stored in the database in a enum, values 'male', 'female' the html I've got at the moment is: HTML Code: Male: <input type="radio" name="male" <?php if ($msex = "male") {echo "checked";}?>/> Female: <input type="radio" name="female" <?php if ($msex = "female") {echo "checked";}?>/> I am developing a site and the client would like to have images instead of radio buttons, how can I do the followings: 1) Replace the radio buttons for different images 2) When one radio button image is selected, changes to another image Thanks, Valeria I'm developing an app that use IE6 and have come across what appears to be a bug but I couldn't find any references to it on the web. I can't make IE6 ignore tabs on radio buttons. The following code snippet will demonstrate the problem. According to the HTML, you should be able to tab from Button 3, to Button 1, then back to the window (address bar). The radio buttons should behave like Button 2 and ignore the tabs, but they don't. I haven't had the opportunity to try this on other browsers yet. But for this project, it has to work on IE6. Any ideas? And a followup question as well. Is there a way to ONLY have tabs in the content window, and to NOT tab to the address bar? -------------------------------------------------------------------------------------------------- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title> My Document </title> </head> <body> <form> <input type="button" name="button1" value="Button One" tabindex=2> <br/> <input type="button" name="button2" value="Button Two" tabindex=-1> <br/> <input type="radio" name="buttonG" value="Button Four" tabindex=-1> <br/> <input type="radio" name="buttonG" value="Button Five" tabindex=-1 CHECKED> <br/> <input type="button" name="button3" value="Button Three" tabindex=1> <br/> </form> </body> </html> Before I begin, I'm new to these forums, and if someone can give me an answer, I plan to answer some of the more obvious questions around the forum. Alright, so I've searched for around 2 hours trying to find this. Everytime I try, I end up running into people asking the same question over and over again, "How do I create a link that changes the iframe's page?" That is not the question I am asking. Basically, I run a photoshop tutorial website, that I just started. I use an iframe, (named, "mainframe") and I know how to create links that change the iframe's contents. However, I want to submit some of my tutorials to other websites. The problem is that if I link to my website, the iframe loads the default page, and they have to navigate their way to the tutorial themselves, and that is not acceptable for those that actually need tutorials... I've found the temporary solution of copying the index.html file and then modifying the html code to set the default iframe page to the tutorial, then linking to the copied index file. However, I would rather just have one index file, and change the iframe page using a single U.R.L. To further simplify my question, I know it's going to look something similar to this: "http://psprofessor.orgfree.com/index.html?framepage=http://psprofessor.orgfree.com/images/tutorials/patterns/home.html" I know that this is not correct, and you need some sort of indicator as to what the name of the iframe is, I only showed that to show what type of question I'm asking. I also realise that the answer to my question may not include the word, "framepage." The url of the page with the iframe is: "http://psprofessor.orgfree.com/index.html" The url of the page I want to load into the iframe is: "http://psprofessor.orgfree.com/images/tutorials/patterns/home.html" The name of the iframe is: "mainframe" Basically I want to compress all that into a single url that I can type into my browser, and when I type it into my browser, I want to go to the index page and have the iframe named, "mainframe" load the tutorial page as opposed to the default iframe page. Thanks in advance to any assistance that I can get. |