Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Javascript and Coldfusion

Status
Not open for further replies.

ice78991

Programmer
Nov 20, 2006
216
As CF developers will know, Coldfusion tables generally contain a lot of looping code as you cycle through query objects.I am considering using <cfoutput query =.... loops to fill javascript arrays and then recreate the loops to output the tables with javascript using document.write(..). This way I hope to shift some of the burden of displaying these tables from the server to the client and I will also reduce the file size

Has anybody attempted this and is there much performance gain to speak of? I assume that coldfusion will have to output and do less with this method. However document.write(...) can make code less neat and harder to maintain? All comments appreciated !
 
How are you going to get the table data from the server to the client side? Javascript (unless it's JScript ASP or AJAX) doesn't have any contact with the server. Even with AJAX, you're going to have to have some kind of server-side scripting to read the data and produce it for Javascript to use. How would writing the data into Javascript to run to create dynamic client-side pages be faster than just creating them directly on the server?

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top