How to enable multiple select boxes on a page ?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
drors30
Forum Newbie
Posts: 10
Joined: Sat Jan 12, 2008 1:59 pm

How to enable multiple select boxes on a page ?

Post by drors30 »

Hi all,
The following question is based on a sample appears at w3schools at :
http://www.w3schools.com/php/php_ajax_database.asp

I want to build a similar page but instead of one check box i will have 3-4 check boxes
in one page.
Each of them will call a different Javascript that goes through a different php page and displays the
results of the query in a different table.

How can i achieve this ?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: How to enable multiple select boxes on a page ?

Post by John Cartwright »

You can have as many select elements as you wish, however they are required to have unique name attributes. You mentioned that each element will execute different javascript so you may need to modify the onchange() event handler.
Post Reply