Dynamic select box issue

A place for users and developers of the Xataface to discuss and receive support.

Dynamic select box issue

Postby kevinwen » Tue Apr 27, 2010 1:33 pm

I'm using the technique to generate a dynamic select box described at http://xataface.com/wiki/Dynamic_select_boxes and it worked well for a while until the slaves_options has huge amount of data. This is annoying because user has to wait for 20 seconds or more to get response when he change value on master field or just clicks on the slave field.

I know that the slave_options has to loop through 26000 rows to filter out what is for the master value selected. I think using AJAX could fix this problem. I know another post viewtopic.php?f=4&t=4886&hilit=ajax demonstrates the solution. But how do we get this done in our code? Where should we put this code? Could you give me a detailed example demonstrating the steps to accomplish it? Many thanks.
kevinwen
 
Posts: 109
Joined: Mon Dec 28, 2009 3:44 pm

Re: Dynamic select box issue

Postby tomhousley » Wed Apr 28, 2010 12:32 am

Hi Kevin,

I posted the question you linked to.

I found an AJAX solution here:

http://php-ajax-code.blogspot.com/2007/ ... ities.html

This has examples that work with 2 or 3 dropdowns.

You can download the source at the bottom of the page.

I haven't integrated it into xataface yet.

The slave option has about 6000 records and it seems very quick to load.

Hope this is of some help. When i have integrated it into xataface, I will post the source here.

All the best, Tom
tomhousley
 
Posts: 52
Joined: Thu Feb 26, 2009 1:02 am
Location: United Kingdom

Re: Dynamic select box issue

Postby kevinwen » Fri Apr 30, 2010 11:41 am

Hi, Tom

Thank you so much. I appreciate your help!

Kevin
kevinwen
 
Posts: 109
Joined: Mon Dec 28, 2009 3:44 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 35 guests

Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved