homepage Welcome to WebmasterWorld Guest from 54.197.111.87
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / XML Development
Forum Library, Charter, Moderators: httpwebwitch

XML Development Forum

    
Populating ajax cascading dropdowns from XML
is it possible to do this?
Bewenched




msg:4529543
 7:03 am on Dec 19, 2012 (gmt 0)

I'm familiar with XML for data feeds etc, but have never used it for our actual site. Currently we have 3 dependent dropdowns that are just using javascript to pull the dependencies....

I was thinking the other night, wouldn't it be great to just have a flat xml file for this type of implementation with ajax and save ourselves the server load on queries, but I don't even know if this is possible.

If it is possible, does anyone have an example...

Sadly I'm not using PHP on this project, it's classic asp/vb

 

httpwebwitch




msg:4536531
 1:53 pm on Jan 16, 2013 (gmt 0)

If you're preloading the data to populate the dropdowns, then I'd define the dependencies using JSON, not XML. Just make a big object and then access parts of the object to create your <option> nodes.

In the case you're doing AJAX to get the dropdown contents, reading and grabbing data from a large XML file will be slower than getting the same info from a similarly-sized SQL table.

In either case, caching the AJAX output in something like Redis or Memcached will provide speed.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / XML Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved