i would go for option 2, by having jquery modifiy all links by adding a variable "js=1" so, since it is added only if javascript is activated, then you can modify your serverside scripts to test against that value: if js=1, echo the results, if not, render the whole page.
_____ From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Benjamin Sterling Sent: mercredi 13 juin 2007 1:07 To: jquery-en@googlegroups.com Subject: [jQuery] Re: Adding AJAX(?) functionality to existing site... do I make new server files? 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 <HYPERLINK "mailto:[EMAIL PROTECTED]"[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 HYPERLINK "mailto:[EMAIL PROTECTED]" [EMAIL PROTECTED] HYPERLINK "http://www.swatgear.com/sig_logo_rsml.gif" -- Benjamin Sterling HYPERLINK "http://www.KenzoMedia.com"http://www.KenzoMedia.com HYPERLINK "http://www.KenzoHosting.com"http://www.KenzoHosting.com Ce message Envoi est certifié sans virus connu. Analyse effectuée par AVG. Version: 7.5.472 / Base de données virus: 269.8.15/847 - Date: 12/06/2007 21:42
<<sig_logo_rsml.gif>>