Page 1 of 1

Grouped Selection Boxes

Posted: Fri Aug 24, 2007 10:37 am
by jonhurlock
I dont really know if this is the right place for this as it is NOT joomla specific. What I have is a A list of Cities, A list of Areas, and a List of Streets.

There are several cities, each with several areas, and each area has several streets. Now what I want to do is create three drop down menus 1 for cities, 1 for areas in that city and 1 for roads in that area.

What I want users to do is to be able to select a city which will then restrict the list of areas, so its specific to that city, the be able to pick an area, which will restrict the list of streets in that area.

Any idea how i could do this? Any help would be appreciated.

Regards,

Jon

Re: Grouped Selection Boxes

Posted: Fri Aug 24, 2007 4:02 pm
by seadap
Sounds like this is a perfect question for the J!101 forum.  I'll bet there's someone hanging out there that could be of help.  I'll ask the mods to move this thread for ya.

Re: Grouped Selection Boxes

Posted: Fri Aug 24, 2007 4:18 pm
by Dylan1968
Hi Jon,

I don't have a specific idea on how to accomplish this, but my first guess 1) would be to look into AJAX. Research if you can use that.

If it's for registered (logged in) users, you might be able 2) to connect it to i.e. whatever they filled in themselves in their profiles (i.e. CB, forum profiles)

Both are just off the top of my head. Sorry I don't have the code for you... and maybe both options 1 and 2 are totally the wrong way to accomplish this.

Please keep us posted however. I have been playing with the idea of combining several 'sources' to be able to better target ads (or links). For now I simply lack(ed) the time to ully research this, let alone code it... but here's what I had in mind. Lots of 'keywords/ad logic' can be taken from either whatever the browser (IP=location) or some stats module tells me, or from where (Section/category) in the site they are. An example. If I know their location (browser or stats) I can target the ads accordingly. That's not a biggie. Second, if I have Section/categories worked out well, I could do specific ad (or other) targeting based on where in the site they are. Let's say I have a business directory which I categorized into types of business. Now if they are looking at business of type A, then target the ads that are relevant to that kind of business. Now I'd like to combine these two things, to better target ads. More revenue since it's better targeted.

Now if you can combine these two things, you'll have even better context-relative advertising. But there's some things software could never tell you. I haven't yet encountered some software that can tell me whether a page visitor is male or female or what age range they  are in, to name just two things. Now if it is (partly) a community site, they might have a profile where they have given me such information... if they filled in their profile fields.

Of course this does not necessarily have to be used for advertising. You can build your context menu's on this, or simply show those links at top that are more interesting for males aged 20-35, living in Wales (for instance ;)) and that are reading something in the section\category on cars instead of boats.... The end user may also profit from this.

Scenarios along these lines... but unfortunately I for now lack the time. Just too busy designing sites for my clients.

Good luck though with your City/areas/streets idea. It does sound like the smart thing to do and will definitely benefit both you and the website visitors.

P.s. Maybe both option 1 and 2 are totally wrong for you. This is just my first hunch.

Re: Grouped Selection Boxes

Posted: Fri Aug 24, 2007 4:18 pm
by jonhurlock
Seadap thanks for the move, i would just like to point out that this is not for a joomla site, its another site I am working on currently.

Dylan, ajax seems like the most sensible way. I was just wondering if anyone knew of any code snippets, which i could possibly take a look at and possible modify to suit my need.

Re: Grouped Selection Boxes

Posted: Fri Aug 24, 2007 5:57 pm
by unixboymd
What you're looking for is called "chained selects".

This may help get you started. http://dynamicdrive.com/dynamicindex16/chainedselects/index.htm

Re: Grouped Selection Boxes

Posted: Fri Aug 24, 2007 6:16 pm
by tjay
Wow that is a very cool and useful tool
thanks for the link

Re: Grouped Selection Boxes

Posted: Sat Aug 25, 2007 2:14 pm
by jonhurlock
Thanks Unixboymd! That was exactly what i was looking for :D

Re: Grouped Selection Boxes

Posted: Sat Aug 25, 2007 2:28 pm
by Dylan1968
Unixboymd: thanks for the tip. I had a look as well. And a very useful tool indeed. Cool!

Jonhurlock: Please keep us posted. I'd love to see it in action on your site.