tags:

views:

111

answers:

2

Just to give you a bit of background i have a system where there's certain calculations that need to be calculated in the main section, there'll be various form fields under different tabs, for simplicity sake i have 10 sections, all with 20 drop down boxes and when you change the value of one of the drop downs it's recalculated in the main area (various calculations etc.) now these form values need to be persisted and stored in a database and then saved and reloaded when ever needed.

Logically i don't want the database to return 200records and then set the drop down boxes for them all manually (using maybe a switch statement) as that'll no doubt be a ball-ache.

Any suggestions?

+1  A: 

Could you pull the records one or two select boxes ahead via ajax? Ie.

select1 <-- filled select2 <-- filled select3 <-- unfilled select4 <-- unfilled

Once select1 is selected, make an ajax call that fills select 3.

Myles
+1  A: 

If they are all in 10 sections, you could write queries that only return the 20 values or so you need. Or you could possibly break them into multiple tables, and use a couple relational tables to keep them straight. As far as the calculations, just store those in the database as well, and use ajax or the post submits to recalculate and update them when necessary.

GSto