HTML - Conditional Drop Down Boxes
I have a custom order form where the choices available in one box should be conditional on another one. I want both the drop down boxes to display on the same page.
For instance, the first box has regular, superior and deluxe. The second box would have red, orange, violet, indigo, blue. If user chooses regular, all colour options would be available.. If user chooses superior, red orange violet would be available If deluxe, only red available. How would I do this? Similar Tutorialshi All, I want to add two select(dropdown lists) boxes. Content of first select box will be name of countries. And the other select box which will contain states of those counties should show the values according to the value selected in first select box. Eg: Suppose I select America then it should only show the states of America. I want to know whether it is possible using simple html? or javascript is required? and how? Regards, Jaas Let's say I have 2 drop down boxes. Both have the choices 10% to 100%. Can I make it so that depending on what % you choose the submit button takes you to certain links? I'm trying to do what this site did but without all of the country, keyword, sort by etc. I just want one category and the % boxes and that's all. I already have the necessary links so that's not a problem. Here is the page I am working on: http://pharosgroup.net/index.php?opt...=article&id=79 From Leadership Competency downward, I am trying to align those drop down boxes so that each of them are the same no matter how long or short the question is. It seems all questions that take up two lines have the boxes all the way to the right by default and its perfect just the way I want it! However I cannot get the rest to matchup correctly, any tips or help would be great! I do have Dream weaver also but cannot figure it out! I can also post the code if it will help. Hey there, not sure if this is the right place to post this but here goes. (Did look to make sure but wasn't a 100% positive) Anyway, I'm pretty familiar with the basics of html. I can read it and understand what most of it says. My first question is, do you think frames would be a good idea here ??I don't work them often so I'm not too familiar with them but I do understand how they work. I was thinking just two side by side or would I need to do one on top & two side by side. Nothing would alter above the main image so it's why I didn't think it was necessary. But again, not an expert. Second question. On this on this page is more complicated. I know about drop down boxes but what I was thinking of have it has it is now except the dark purple not show until you click on the letter you want. (I know that sounds like a normal drop down box but I'm not sure how else to explain it) Just wondering if that was possible to do without it being too difficult. <3 thanks a lot everyone. I appreciate all help. Lilly First I am not sure if this is the right place to post this, it might need to be in a different language section. Sorry for that if it is. I need to create a set of drop down boxes, most likely 6. Each box needs to have 4-5 different options in it. There is no order in which they need to be set up because the user HAS TO be able to start with whatever box they want. From their choice in the first box, certain selections in the other drop down boxes would have to be eliminated. Same with the second, third and so on. There can be no predetermined order of what one they start with because not all the boxes will apply to every user. Another way to imagine the basic concept if I am not clear enough is go to any car website like kbb.com. When you first select the company who makes your car, Honda for example, the next box over will bring up a list of all the cars Honda makes. Then when you choose the car, Accord for example, the next box will give you the option of the manual or automatic and so on. I am kind of looking for this functionally, but I need it to be where you can start with any box and no matter what you choose in the first box, it does not eliminate all other choices, just 1 or 2 from each box (based on the selection). I know this is kind of hard to understand, it is even harder for me to describe. lol. If you can give me any help that would be wonderful, even if it is just a language this would be able to be accomplished in. I would really like there to be a web version for a website as well as a stand alone program to run on computers (this will probably be done in C# I am guessing). Thank you so much, Brian Stoiber Hey all, I've been looking all over the net for a tutorail about this, but I can't seem to find one. What I'm trying to do is make a drop-down box where you can select an option, press a submit button, and it'll open up a new window *or tab for firefox users* pertaining to that information, such as a site that I choose to link to it. This is the code I'm using for my option box <div align="left"> <select name="xfer" size="1" style="color:000000; background-color:226622; font-family:trebuchet ms; font-size:11px; border:thin solid "ffffff;> <option></option> </select> </div></form> I'm totally stumped here. Any help would be greatly appreciated! -Cheers, Billy How exactly can I make a drop down box (<select>) make an iFrame load something else? So that the iFrame displays new information but stays on the same page If this is not possible or to complicated how else could I do something of the same effect? Hi all. I've been updating a website that now has a list that is getting to big and takes up abit of scrolling. Can anybody direct me to code that allows me create drop down boxes for each catagory that lists the html pages. When the user selects the page from within the drop down box it either goes straight to the page or they need to click "go". Cheers. Leroy Would it possible to use the iGoogle api to drag and drop boxes around ? Could you indicate me the link ? thanks Hi, I am looking for some help with HTML forms, namely forms which mainly comprise of drop-down boxes. I know how to create drop-down boxes in forms, though what I want is that each variable in the drop-down box should go to a different URL. For example, if someone selects "variable 1" and then clicks submit, it should go to a different URL than when they select "variable 2" and click submit. I have all the URL's, though I'm just not sure of how to make each variable go to a different URL. Can someone help me out with this? If anyone knows of a site which has something similar like this can you please direct me to it so that I can look at he source? Thanks. Why do the images in the background show through the drop in box on my site? http://www.nomoreheartdiseaseandstrokes.com/ Should I put all the information within a table in the drop in box? Thanks We are doing a website for our shop and need a place where our local dealers can come online and see what we have in stock. i need to have 4 drop down boxes: 1) rim size, 2)brand 3)offset 4)bolt pattern. but they dont have to have all 4 criterias to seach so they can search all the 20 inch rims no matter what brand. i was thinking this is something similar to the one on cardomain.com (towards the middle of the left side. it says browse community and then has 2 boxes and a go button). please advise. thank you 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 Is it possible to combine ie's conditional if's? I basically want (without the use of js) to be able to send a message to IE5 / 5.0 / 5.5 / 6 users. But i want to keep HTML download to a min.... Therefore can i combine the conditional iff's? can i put a conditional statement in a .css file ? im having trouble with getting my div & or hr to work in every browser i fix something on 1 browser i loose something from another when im coding the site... i want to know if i can put a statement that if browser internet explore execute this set of rules, elseif execute these set of rules... Hi I am using a conditional comment on a website to load a css sheet for IE6 and below <!--[if lte IE6]> <link href="expleonardo.css" rel="stylesheet" type="text/css"> <![endif]--> In IE6 it loads the sheet and does what I want it to do but the following: <!--[if lte IE6]> <![endif]--> shows at the top of the page on a white line. The website address is www.errolsimprov.co.uk/leonardo/index.htm Any help would be greatly appreciated. Thanks John Is it possible that the inclusion of a script on a page be conditional to the web server that it's on? Example: if(the page is on Web Server 1) { Include Script 1 } else if(the page is on Web Server 2) { Include Script 2 } I'm working on several Google Maps web pages (10-12 at a time). I test the pages on our development web server and then move them to our public web server. The problem is that there is a different Google Maps Key for each web server that must be included on the web page. Right now, I have to comment out one and uncomment the other every time I copy these pages from one server to the other. Example of GM Key on Web Server 1: <script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAADCKg1uyd0NtoV0-TYT13MBROYM5OA_GDIvgonnUJTWljoaMDChT_7EqrLEb8A0mLzFhHNCgkaMCUIw" type="text/javascript"></script> Example of GM Key on Web Server 2: <script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAA2Aa0y9qM0iE5-qtohbB_BBR7Dq-sN_oqy05rIf4WVBwd942bvhSeBq4siSIiJWbTtlmDhuk0aADGRA" type="text/javascript"></script> Is it possible that the inclusion of a script on a page be conditional to the web server that it's on? if(the page is on Web Server 1) { Include Script 1 } else if(the page is on Web Server 2) { Include Script 2 } I'm working on several Google Maps web pages (10-12 at a time). I test the pages on our development web server and then move them to our public web server. The problem is that there is a different Google Maps Key for each web server that must be included on the web page. Right now, I have to comment out one and uncomment the other every time I copy these pages from one server to the other. Example of GM Key on Web Server 1: <script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAADCKg1uyd0NtoV0-TYT13MBROYM5OA_GDIvgonnUJTWljoaMDChT_7EqrLEb8A0mLzFhHNCgkaMCUIw" type="text/javascript"></script> Example of GM Key on Web Server 2: <script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAA2Aa0y9qM0iE5-qtohbB_BBR7Dq-sN_oqy05rIf4WVBwd942bvhSeBq4siSIiJWbTtlmDhuk0aADGRA" type="text/javascript"></script> Hi everyone, just wondering if anyone could help me with a problem I'm having making an HTML form? I have been following directions on this website: http://www.w3schools.com/html/tryit....ryhtml_select2 and learned to make a drop down box to my form. So far, this is it: HTML Code: <form> First name: <input type="text" name="firstname"><br> Last name: <input type="text" name="lastname"><br> Artist: <select name="artist"> <option value="the minutemen">The Minutemen</option> <option value="Planet Smashers">Planet Smashers</option> <option value="crass">Crass</option> <option value="Madonna">Madonna</option> <option value="the misfits">The Misfits</option> Album: <select name="album"> <option value="album">album</option> </select> </form> So what I want to do now, is have it so if the user clicks on Madonna under the "artist" drop down box, the "album" drop down box will let the user select one of Madonna's albums, but only hers (not any of the other artists' albums). And if the user clicks "Crass" then the "album" drop down box will change and only show Crass' albums, etc. Is there a way to do this in HTML? I am designing the site using notepad (no dreamweaver or anything) and I am running WinXP. My browser is Firefox. I don't really know anything about forms. Thanks for your time! |