I have been asked to produce a web catalogue of services and associated
options, this eventually will be used for ordering the services.
My initial thought was to use a set of cascading drop downs, select an
option from the first fills the available options for the second and so on.
Given the current buzz about Ajax this would seem an opportunity to try out
some of its features.
Could anyone point me at an example of what I am trying to do? For
information, the target web server environment is Apache with both mod perl
and mod php being available.
What I need to be able to do is have the user presented with a single dropdown menu within a form using HTML <SELECT> and <OPTION>. Once they choose a particular option I then want another dropdown to appear alongside it with a list of options that are dependent on what was selected in the first dropdown. Then I want the same thing to happen a third time, i.e when the user selects an option from the second dropdown a third one appears on the screen to the right of it and then whatever the user chooses from this final dropdown is used in the form submission.
Because I am a complete beginner it would be really useful to have an actual code example that I could then modify with my own options.
I'm using a dynamic cascading dropdown javascript for my webpage URL... that for the most part is working well.Two problems:
1. I'm using some php to make the dropdown a form so that when a user makes choices and submits, those values are retained. This works well in Firefox 3, but not in IE. It looks like the html submitted="submitted" tags are being put into the html code in IE, but for some reason IE isn't taking that into account.
2. I would really, really like the third drop down to revert to "Choose a song" when a new composer is chosen. It automatically reverts to "choose a book" (the second drop down), but for the life of me nothing I try can make both drop downs revert when the first drop down is changed.
Ok, I just tried to make this post and got logged out when I hit preview, so this time around it's gonna be much shorter as my patience has run out.
...Over at gazingus.org there is a sweet little bit of code that uses the DOM to make dropdown menus.
I have altered the code (see below) to make the menus appear on the first mousover instead of the onClick event.
However, they never go away. I'm trying to figure out how make the last menu open disappear after a short delay. I've already tried this
actuator.onmouseout=function(){
if(currentMenu){ setTimeout('currentMenu.style.visibility = "hidden";',2000); } } However, it doesn't work. The delayed code events pile up on each other if menus are continually moused over and out. (Say the user can't decide what menu they're looking for and runs the mouse left...then right...then left...)
The result is that after the 2000ms the menus close instantly....
/* * menuDropdown.js - implements an dropdown menu based on a HTML list * Author: Dave Lindquist (http://www.gazingus.org) */
var currentMenu = null;
if (!document.getElementById) document.getElementById = function() { return null; }
function initializeMenu(menuId, actuatorId,position) { var menu = document.getElementById(menuId); var actuator = document.getElementById(actuatorId);
I am working on real estate web site. The search module requires the following client-side functionality: 1) a radio button group to select sales <ORrental 2) based on the above selection, a dropdown list should display the applicable price ranges.
The functionality is identical to the code found @ http://webdeveloper.earthweb.com/re...ops_simple.html
The only difference being that the first dropdown should be replaced by a radio button group.
Having very limited knowledge in JavasScript, I have been unable ta adapt the code.
I'm trying to create a drop down menu with four different boxes. The site I'm working on is basically an ecommerce site, so I'll use cars as a good example for what I want to do.
Let's say that I'm selling cars and want to target the buyer directly, then I would have the following boxes, each one serving as a dependent of the one before it:
1. Pick the brand (BMW, Mercedes, Etc.)
2. Pick the type of car (Sports car, SUV, Mini Van, etc.)
3. Pick the color (blue, green, etc.)
4. Pick the price ($0-$19,999/$19,999-29,999/etc.)
So far I have the first two boxes down by using the following site: [URL]. Now my problem is that the site only allows for the first two boxes to be made, and says that
"the values in box1 are static and printed directly as normal HTML. The corresponding box2 options will also be copied into the HTML as well as the javascript for full functionality."
Being a complete newbie, I have no idea what this means. So I decided to search the internet for an answer and was not able to find one, thus leading me here, which from the looks of it seems like a great forum.
how to connect a third and fourth box that falls into the same hierarchy as the first and the second then I would appreciate.
i have a soccer-site, on which of course, can be kept track of played matches. Now the admin has to be able to set the number of goals, and then select who scored what goal.
I want a system where one can put a number in a textfield (NaN would return an error). Say the admin enters Ɖ'. Then three dropdown lists appear below that field, in them are the players. If he turns Ɖ' (goals) into ƈ', the lowest one has to be deleted, but the upper two have to stay, with an unchanged (already selected) value ...
Preferrably cross browser. I just can't seem to figure out, i've tried loads of innerHTML and document.write(), both didn't give me what i wanted (yet).
Does anyone know if such a thing exists in web programming as an intelligent dropdown boxes (you know the type where u can type and it automatically completes your text for you from data it has stored in the database?)
what i'm looking to do is have a drop down menu, where when an option is selected it displays a description elsewhere on the screen and opens up another drop down menu along side the first one, then i'd like the second one to do the same as the first and finally i'd like the third one to just display a description.
but i'm not sure how to do it? javascript? if so what's it called so i can look into it/a tut on it.
so drop down 1 is either poetry or prose down down 2 is for poetry + narrative + nature + romantic
but for prose it's + fiction + non-fiction
but that's not just it, if you select poetry in drop down one, i want it to display a description (that's in the description="" of the option) and i want that the same for each different menu, though to appear in different position for each menu Code:
when a user clicks a radio button, javascipt populates the next drop-down depending on which radio button they clicked. This then happens to a next drop-down list. Code:
I am trying to create a webpage and it would be obvious to anyone who reads my source code (it's a mess) that I created it using a template. I know almost nothing about webpages, but am happy with all but a few bugs in my page.
I have read many posts about opening drop-downs in new windows, and have spent hours looking over my source code to see what I have done wrong.
My links open in the same window like I want, but ALL of my drop-downs open in a new window!
you'll notice that when you click on the drop down arrow graphic for each module, there is a drop down menu that appears. You can move the module around the page and the drop down menu always appears under the arrow.
Does anyone have any recommendations as the best way to do this? I am grateful for any experiences you have. The key here is relatively positioning this drop-down menu.
i am quite frustrated with this. I have a dropdown with the values populating from database. Now when the user select "New" from the drop down, a new textfield should be seen which is in other case hidden. The code is working absolutely fine with firefox but its not at all working with IE. What could be the problem? What do i have to do extra for making it work.
Code in Head Tag <script language ="javascript"> function abc() { if(document.form1.select1.value=="New")
I want to make a dynamic 4 drop down menus with AJAX and PHP/mySQL, like this:
Category->dynamic subCategory
County->dynamic cityCounty
Is there any good tutorial that can teach me how to do this? I managed to have that Category dynamicly loads subCategory and that County dynamicly loads cityCounty but I ran into a problem when I already picked subCategory and than went on to pick a County, because of the reload.this function in javascript my subCategory gets lost. Can anyone point me in right direction?
I'm trying to build a string based on three drop downs. As each drop down choice is made, I want to append the string and redisplay it. When finished the string will be a complete (but not hyperlinked) URL.
My drop downs look like this:
HTML Code:
PHP Code:
Here's how it supposed to work...
When an admin has used the first drop down to pick the value of the "first" variable, the string is updated and redisplayed like so:
Next, when an admin has used the second drop down to pick the value of the "second" variable, the string is updated and redisplayed like so:
Finally, when an admin has used the third drop down to pick the value of the "third" variable, the string is updated and redisplayed like so:
That's all I have. I'm stuck. I'm guessing I need an "onChange" event with each drop down? Also, I need to refresh the "makeTheLink" div when an onChange event fires? How do you tie all of this together? Is self rolled JavaScript the best solution or would jQuery be better?
I'm new to this forum and also to Javascript. I've modified some script to add a browse button when "Add More" has been clicked.I was hoping someone may know how I can duplicate the entire row so that the two drop-down lists are also duplicated, in addition to the browse button
On my website the navigation is at the top and right aligned. When you hover over the items on the right and the drop downs begin to appear they drop down and fold out to the right and consequently off the page and not very visible. Is there a way to tell the drop downs to roll out to the left instead of right?
I am using the following code to show / hide form elements within a div based upon the drop down choice. Does anyone know how this code can be amended to use multiple drop downs within one form?
<html> <head> <title>Show and Hide</title> <script>
Is there a good library available (jQuery or stand-alone) that allows you to customize the troublesome form elements that aren't very receptive to CSS across browsers?
I was looking to try to match drop downs, radio buttons and check boxes with the same look and feel as everything else.
1. Add the totals from products under added/Cancelled to the sub total
2. Then taking the sub totals added them to the total products
3. Need the total # of products that was selected as well
4. Then from the total products, want to Added subtract cancelled Divide Number of products = total net (1.34% = 134% w. the decimal moved over 2 spots to the right)
Working on a script that will add together dollar values in user selected drop downs and display on the page. I get the script to work if the total is to be displayed in a text box, but I want to do a document.write() to put it as a piece of text. I know the answer is simple, but I just don't have the experience to figure it out. I think it may have something to do with local/global scope of the variable.