Hi All
I am doing late hours in office because of AJAX. Well not exactly AJAX but becasue of the rendering of the page. So I wanted to know when to use Ajax.
This is my first AJAX module. I am using AJAX to render a data grid, basically a table inside a div. I thought it would be easy as I did a few simple excercises to get a feel. Well as far as AJAX's data fetching is concerned it's OK. The problem comes in when you need to render the response. The thing is you need to explicitly tell everything how it should be rendered. Rendering a whole table on fly is @#$@$@. Then as if it was not enough then you have different browser (mainly IE and non-IE) issues.
The good thing about it was that I learnt a lot about DOM. So does anyone has a list of do's and don'ts for AJAX usage?
And yeah as two posts won't let me win two books, appending a totally unrealated question here only
.
How do I go about adding a checkbox through javascript with an onClick handler. One approach is to use the innerHTML property, and stuff in everything in there. Infact that's what I did but it didn't looked right to me. The whole table is rendered by using createElement so this innerHTML looks out of place. The other option was to use event handlers which sounded a bit scary.
[ April 12, 2007: Message edited by: Anupam Sinha ]
[ April 12, 2007: Message edited by: Anupam Sinha ]