1) Yes, don't issue the document.write() statement. This is what 'draws' the grid to the screen.
2) This is so you know where the grid will show up in the flow of the document. It is perfectly acceptable to have SCRIPT in the body of a page.
If you have unformatted data make sure that you are loading the CSS file, this is vital. The grid will not display without the CSS file. Also, if you have the above script in a function, and you do a document.write(), how do you control where it goes on the page? I suggest that you create a DIV to conatin the grid then do a document.getElementById(theDIV).innerHTML = yourGrid; this will put the grid into the DIV and you can easily control where the DIV is on the page ahead of time.
Wednesday, August 31, 2005
I have done what you said Hunter before I posted and it did not work (and still doesn't work).
I have included the simple sample code below. I want the grid to show only after the user clicks the 'TestNow' button.
Clicking on the 'TestNow' button produces badly formatted garbage.
The funny thing is...when I view the source code of page that comes up after user click event..the source file, css files..all are missing?
I don't understand why...I did include them in the original page.
Here is the sample code...please let me know if you spot something I am missing...