Hi
This is an ajax questions. I have a table this table shows users information at certain time depending on what settings the user sets.
Now in some cases a user will see the information right away and in some cases they won't it all depends on when they want to see the information.
Now what should I do?
Should I do? do a post and post their data and then do a ajax get after to get the table and render it?
*I probably could it all in the post but unless some huge performance gain is gained I rather not otherwise I have to do mix "success/fail" messages and the table to be rendered all in the same response.
So each one seems to have pluses and minuses.
Ajax way
don't have to worry about having a
JavaScript solution that queries the database to figure out what their
timezone is and then determine if the row should be added or not and any
other headaches that comes with
javascript dates.Each row could potential have a
different style to. This would
mean I would have to possibly do a
query to the database and figure it
out or have hidden field in the page for easy access. With Ajax way I
would not have to worry about it.- don't have to worry about making a
manual row in javascript/jquery
syntax what can be a pain to do if
you have many columns.
Javascript way
- Problem less of a performance hit since only have to potentially make one new or do nothing. Where otherwise I have to generate a new table regardless and if it has lots of rows in it that could be slow.
- Have to rebind all jquery plugins that would be on the table. Or use jquery.live for everything else.
So I am not sure to me it seems like a hard choice.