Chris, If you want to keep your site unobtrusive, then option 2 would be better. Just pass an extra param, whether it is a POST or a GET, and have the serverside page keep a look out for that param. This of course is assuming that your current set up is something like: formpage -> processpage ->redirectedToPage.
If you are currently doing something like formPageAndProcesspage -> redirectedToPage, you can still achieve unobtrusive code, but you will need to create a specific page for your processing. Hope that all makes sense. On 6/12/07, Chris W. Parker <[EMAIL PROTECTED]> wrote:
Hello, What's the standard method for fitting an existing site with AJAX functionality? Currently all my server side files that process requests, like deleting rows from a database (e.g. customers, products, etc.), automatically redirect the user to another page with a status message (e.g. success/failure). But now that I'm trying to add some AJAX functionality to this existing site I'm not sure how to handle the server side of it. 1. Is it a better practice to create totally new AJAX specific server files? 2. Or is it a better practice to modify the existing files to know that an AJAX request is being made and that they should (1) not redirect and (2) return the data in a different format? I'm opting for #1 but I can see this might also be an issue because of the need to maintain multiple files. Chris Parker Aardvark Tactical, Inc. IT Manager 1002 W Tenth St. Azusa, CA 91702 phone: 800.997.3773 x131 fax: 626.334.6860 [EMAIL PROTECTED]
-- Benjamin Sterling http://www.KenzoMedia.com http://www.KenzoHosting.com
<<inline: sig_logo_rsml.gif>>