tags:

views:

72

answers:

1

I have a table with rows in the original state (A). When a postback occurs, I reorder these rows in the DOM (based on a business rule) using a JS function. It works fine except that the User experience is degraded when the rows are reordered.

The sequence is as follows: 1. Display the rows in state A 2. Run a JS function that reorders the rows 3. Display the rows in state B

I dont want the user to see the state A.

I am thinking in the lines of setting the div to invisible and after the JS function runs, reset it back to visible. But this doesn't seem to work.

Any workarounds?

+1  A: 

Why not generate the entire table on the client. You could have the server return JSON and then create the table with the document.createElement (or whatever your framework uses) in the order you want it to be.

Luca Matteis