How to enable/create elements on the fly

Posted by Simon S on Stack Overflow See other posts from Stack Overflow or by Simon S
Published on 2010-04-26T14:00:44Z Indexed on 2010/04/26 14:03 UTC
Read the original article Hit count: 241

Filed under:
|
|
|

Hi all

I am using a combination of PHP, jQuery and Spry to serve a series of listboxes in which a user will select first the type of vehicle, then the make, then the model and finally the specific model.

All my listboxes (SELECT) are working fine, and they update properly using the Spry elements. Each listbox is populated from a different Spry XML Dataset, and this is my problem.

If I present all four listboxes to the user, the script has to go and fetch all four lots of XML to populate all four listboxes, taking several seconds. What I want to do is to create/enable the listboxes in order, so at the user selects from the first listbox, the second is created/enabled, when they select from the second, the third is created/enabled... and so on.

Setting the disabled attribute is no good because the script has already fetched the XML before this is processed.

Any ideas??

Si

© Stack Overflow or respective owner

Related posts about create

Related posts about elements