Re: Dynamic Drop Down Box
| From: | Paul Burney | Date: | Wed, 06 Mar 2002 15:45:18 +0000 |
| Subject: | Re: Dynamic Drop Down Box | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-17513@lists.php.net to get a copy of this message | ||
on 3/6/02 10:31 AM, Leotta, Natalie (NCI/IMS) at LeottaN@ims.nci.nih.gov
appended the following bits to my mbox:
> If they want two pages they wouldn't need JS though - just submit and use
> that in your second query to populate drop-down #2. I had assumed that they
> wanted it on the same page - which is definitely cooler :-) Good point
> though - I should have asked which way they wanted to do it. I suppose if
> you really wanted to be able to say your site used JS you could still use it
> to set a hidden value in the form and submit it to the next page that way.
I figured I'd throw something in too.
I personally don't like the client side scripting option because it
adversely affects accessibility. If you choose the client side option, you
should also have a non JavaScript version as well (the 2 pages mentioned
before) for site visitors that have other types of interfaces that don't
understand JavaScript or for visitors that have dynamic scripting turned off
(not a bad idea these days with all the XSS cookie stealing stuff).
That said, WebReference has a great tutorial and a bunch of code that you
can use to make the nifty related drop-down menus. You can see the theory
and tutorial here:
<http://webreference.com/dev/menus/>
And they even have a script that'll generate the code for you here:
<http://webreference.com/js/tools/menus/>
Hope that helps.
Sincerely,
Paul Burney
http://paulburney.com/
<?php
If ($your_php_version < 4.1.2) {
upgrade_now(); // to avoid major security problems
/* Please see <http://security.e-matters.de/advisories/012002.html>
*/
?>