Tables - server-side vs. client-side?

B

Bill S.

I am starting to build quite a few pages that will have
tables of data from an SQL database.

I have been building the table rows on the server side
in VBScript, but I have been thinking about having the
VBScript code just build array variables in the <head>
section (or as local variables), and then have JavaScript
functions on the client side actually populate the tables
when the page loads.

I do plan to do other things like being able to sort the
tables in JavaScript code on the client, limit the tables
height and be able to scroll the rows, and click on a row
in the table, and have the values populate a form. I will
also need to be able to export/download/? some tables into
Excel.


In cases like this, which seems to work better - generating
tables on the server or client? I would really like to hear
opinions and experiences.

tia,
Bill
 
A

Aaron Bertrand - MVP

I have been building the table rows on the server side
in VBScript, but I have been thinking about having the
VBScript code just build array variables in the <head>
section (or as local variables), and then have JavaScript
functions on the client side actually populate the tables
when the page loads.

This will not work very well at all when your datasets become large. IE on
the Mac chokes on very small scripts, IE on the PC will handle much larger
but there is still a limit.

As long as you're not buffering one big 800kb table, or using a single
variable to hold the entire response content, you will probably have much
better luck using many response.write commands than dynamically building
client-side arrays and doing it there.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,142
Messages
2,570,817
Members
47,363
Latest member
eitamoro

Latest Threads

Top