Page 1 of 1

Dynamic select box issue

PostPosted: Tue Apr 27, 2010 1:33 pm
by kevinwen
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.

Re: Dynamic select box issue

PostPosted: Wed Apr 28, 2010 12:32 am
by tomhousley
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

Re: Dynamic select box issue

PostPosted: Fri Apr 30, 2010 11:41 am
by kevinwen
Hi, Tom

Thank you so much. I appreciate your help!

Kevin