I have a classic ASP application
I would like to add some AJAX-style partial page updates to avoid server roundtrip. For example, list of rows displayed, option to add another in-situ, save it, and table redisplayed / add another.
I don’t think I need all the other baggage of the well known AJAX libraries
I would appreciate suggestions for AJAH libraries, and also opinions on whether you think I am daft only adopting AJAH rather than full blown AJAX.
(My application has a template rendering function, so I can already convert database data into ‘rich HTML’, so I perceive that my easiest route is to reuse this and send replacement HTML, using AJAH, to be injected into the page using innerHTML replace)
Thanks
i hate to be a purist; but i think that once you start to use AJAX, it’s far better to let the JS code to do most of the formatting. for your example (tables), i’d use a templating plugin for jQuery. these let you include a static HTML template in the page, and fill it with the data returned by the AJAX queries.
OTOH, if you really want to do the formatting in the server, simply use the
.load()method in jQuery to fetch HTML and insert into any DOM object.