[FX.php List] A better way of making a Conditional Value List ?

David Ness dness at bondedbuilders.com
Fri Dec 5 14:02:21 MST 2008

-----Original Message-----
From: fx.php_list-bounces at mail.iviking.org
[mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Dale Bengston
Sent: Friday, December 05, 2008 3:41 PM
To: FX.php Discussion List
Subject: Re: [FX.php List] A better way of making a Conditional Value
List ?

Also, this can all be triggered by an onchange JavaScript handler  
attached to popup1 rather than a submit button.

(Pardon me if this response comes through twice. The original never
seemed to make it through)

Yes, exactly. A change in popup1 will call a javascript function using
the onChange event handler. This called function will "build" the popup2

Like I said, you can even do this without AJAX ix you don't mind
populating the Javascript array with ALL the potential values of popup2
during the initial page load, plus of course a key field probably equal
to the values in popup1 (although I can think of reasons that values in
the array might appear for multiple values of popup1 which would
necessitate a little more complexity... not much).

Only if the array would be too large or slow to load would you then take
it to the next level: using AJAX to retrieve the subset of array values
once you know the value in popup1.

I'll bet there are examples of how to build popup2 using Javascript and
a javascript array out on the web. I'll do some quick looking, although
I'll be out of here in about 10 minutes for our company party.

David Allen Ness
Database Systems Programmer
Web Applications Developer

More information about the FX.php_List mailing list