Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
how can I make a pull down menu that ...
Old 02-12-2006, 07:56 AM how can I make a pull down menu that ...
Skilled Talker

Posts: 97
Trades: 0
how can I make a pull down menu that when the user picks one options it loads up another pulldown menu beside it.

I want to do something that:

Country --> State/Provience --> Then --> City




Does this make sense?
Does anyone know where I can easily rip the code.
This is easy coding but really tedious.


Thanks for any help
keithkiss is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-12-2006, 08:27 AM Re: how can I make a pull down menu that ...
dahak's Avatar
Skilled Talker

Posts: 60
Location: Romania
Trades: 0
i think this can be done using a javascript that shows/hides a div which contains each pulldown menu...
HTML Code:
    function Get_P(str)
    {
        if (document.all)
        {
            return document.all[str];
        }
        else
            return document.getElementById(str);
    }
    function HideAll()
    {
        if (document.all)
        {
        document.all['item_1'].style.visibility = 'hidden';
        document.all['item_1'].style.display = 'none';
        document.all['item_2'].style.visibility = 'hidden';
        document.all['item_2'].style.display = 'none';
        document.all['item_3'].style.visibility = 'hidden';
        document.all['item_3'].style.display = 'none';
        
        }
        else
        {
        document.getElementById('item_1').style.visibility = 'hidden';
        document.getElementById('item_1').style.display='none';
        document.getElementById('item_2').style.visibility ='hidden';
        document.getElementById('item_2').style.display='none';
        document.getElementById('item_3').style.visibility = 'hidden';
        document.getElementById('item_3').style.display='none';
    
        }
    }

    function show(Element) 
    {    
        if (Element.substring(0,4)=='item')
        
        {
//            alert(Element);
        var obj = Get_P(Element);
        if (obj.style.visibility == 'visible')
        {
            obj.style.visibility = 'hidden';
            obj.style.display = 'none';
            //HideAll();    
        }
        else
        {
            HideAll();
            obj.style.visibility = 'visible';
            obj.style.display ='block';
        }
        }
    }
this is the code i`ve made for a menu on a web site,its not exactly what you need.
It needs some slight modifications and i think it will suit your needs.
item_1,item_2,item_3 would be the name of the divs that contains the pull down menus and you wiill need to add an
HTML Code:
<a href="" onClick="show('item_1')"></a>
to the items in the pulldown menu,and when its clicked it will show the menu.
well...i hope this will help you a little bit..
dahak is offline
Reply With Quote
View Public Profile
 
Old 02-12-2006, 10:10 AM Re: how can I make a pull down menu that ...
JohnJ's Avatar
Extreme Talker

Posts: 198
Location: Raleigh, NC
Trades: 0
Or you can build a navigation bar using Dreamweaver that will do exactly want you want.
__________________
JohnJ

Please login or register to view this content. Registration is FREE

WebImages Inc. - Raleigh NC
JohnJ is offline
Reply With Quote
View Public Profile Visit JohnJ's homepage!
 
Old 02-14-2006, 09:04 AM Re: how can I make a pull down menu that ...
Ultra Talker

Posts: 255
Location: NY
Trades: 0
Hi,
I am working on a website right now and using the exact method for a navigation bar that you're looking for. It's done completely with CSS and it's not too complicating to do once you get into it. I used the model from this website that explains everything. It's a very good source to have. You can create both vertical and horizontal menu's. The good thing is you don't need javascript, just plain ole' HTML and CSS.

Check it out here.

You can check out my site at JazzyWalls here where I used it, although at the moment I don't have it going as deep as you want it to go, I'm still working on those pages. But you'll get the idea of how it looks, etc. It works in all the browsers, too, although Firefox makes it appear a bit smaller, but it works.

Just my 2 cents,
DianeD
DianeD is offline
Reply With Quote
View Public Profile Visit DianeD's homepage!
 
Old 02-17-2006, 09:20 AM Re: how can I make a pull down menu that ...
Skilled Talker

Posts: 53
Trades: 0
I`d rather use flash, , create some mc and some buttons ... but this code is indeed useful!

Good luck
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
darkstar_tfd is offline
Reply With Quote
View Public Profile
 
Old 02-17-2006, 09:32 AM Re: how can I make a pull down menu that ...
karinne's Avatar
Extreme Talker

Posts: 197
Location: Quebec, Canada
Trades: 0
Quote:
Originally Posted by DianeD
Hi,
I am working on a website right now and using the exact method for a navigation bar that you're looking for. It's done completely with CSS and it's not too complicating to do once you get into it. I used the model from this website that explains everything. It's a very good source to have. You can create both vertical and horizontal menu's. The good thing is you don't need javascript, just plain ole' HTML and CSS.

Check it out here.

You can check out my site at JazzyWalls here where I used it, although at the moment I don't have it going as deep as you want it to go, I'm still working on those pages. But you'll get the idea of how it looks, etc. It works in all the browsers, too, although Firefox makes it appear a bit smaller, but it works.

Just my 2 cents,
DianeD
I don't think this is what he's after. He want the user to select the country then the next drop down will populate with the states (or provinces). When the state (or province) is selected, the next drop down is populates with according cities and so on...
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE


Getting on the Web Standards band-wagon? Get these books -
Please login or register to view this content. Registration is FREE
and
Please login or register to view this content. Registration is FREE


Takin' in the view from the outside. Feeling like the underdog. Watching through the window I'm on the outside. Living like the underdog.
-Dream Theater
karinne is offline
Reply With Quote
View Public Profile Visit karinne's homepage!
 
Old 03-03-2006, 01:37 PM Re: how can I make a pull down menu that ...
Skilled Talker

Posts: 97
Trades: 0
karinne - your absolutely right.
Thats exactly what I want to do. Thanks for the help with the wording

Keith
keithkiss is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to how can I make a pull down menu that ...
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.32521 seconds with 12 queries