Jump to content


Photo

Select Boxes


  • Please log in to reply
3 replies to this topic

#1 brown2005

brown2005
  • Members
  • PipPipPip
  • Advanced Member
  • 943 posts

Posted 05 June 2006 - 09:37 AM

Hi,

I have two tables;

1. categories - categories_id, categories_name

2. categories_sub - sub_id, sub_categories_id, sub_name

what i want to do is have one select box that gets a list of categories from table 1 and then when you select a category in the first select box, the second select box automatically updates with the sub categories.

any help please?


#2 Barand

Barand
  • Moderators
  • Sen . ( ile || sei )
  • 18,017 posts

Posted 05 June 2006 - 01:35 PM

Use either

javascript - see baaSelect link in my sig

or

see [a href=\"http://members.aol.com/barryaandrew/xmlhttp/article.html\" target=\"_blank\"]http://members.aol.com/barryaandrew/xmlhttp/article.html[/a] for AJAX method
If you are still using mysql_ functions, STOP! Use mysqli_ or PDO. The longer you leave it the more you will have to rewrite.

Donations gratefully received






moon.png

|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts

#3 poirot

poirot
  • Members
  • PipPipPip
  • Advanced Member
  • 646 posts
  • LocationAustin, TX

Posted 05 June 2006 - 02:10 PM

Barand, your pages look a bit "technical".
And it'd be nice if you could give us a living demo :)
~ D Kuang

#4 Barand

Barand
  • Moderators
  • Sen . ( ile || sei )
  • 18,017 posts

Posted 05 June 2006 - 02:16 PM

Alas, I haven't got round to getting a hosted domain yet.

And it is a technical article.
If you are still using mysql_ functions, STOP! Use mysqli_ or PDO. The longer you leave it the more you will have to rewrite.

Donations gratefully received






moon.png

|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users