Non-Javascript Friendly Site |
[eluser]Narkboy[/eluser]
I'm building a e-commerce site for a client who dearly wants "web 2.0" (ironic quotes...) functionality. He mentioned Facebook... Anyway: In order to work properly with users who don't have JS enabled, the entire site is built without javascript and works just fine. Now to add in the fun stuff - I'm using jQuery, jQuery UI and jQuery Tools. I want to change some links on the fly so that js users get ajax functionality - for example, a non-js user clicks on 'show cart' and the cart page loads; while a js user click and gets the cart in an overlay. Using rel="overlay" can direct js users to an ajax request, but if they request the same url as a non-js user they get the entire page, rather than just the relevent part. No point reloading the <head> etc. I can use jQuery to change the href only in a tags with an .ajax class. Is it better to: 1) http://www.example.com/shop/show_cart - loads the full page with cart details. http://www.example.com/shop/ajax_show_cart - loads the cart snippet into an overlay. The problem is that the js to rewrite these links is a pain. I don't want to work out how to do this for all possible controller / function pairs required. 2) http://www.example.com/shop/show_cart - full page http://www.example.com/shop/show_cart/ajax - ajax snip Problem here is that I'll have to edit all controller functiuons that can deliver via ajax to check for the var. Also, if the function requires / permits additional vars to be passed, then the ajax var will probably have to go last. 3) http://www.example.com/shop/show_cart - full page http://www.example.com/ajax/shop/show_cart - ajax snip This requires an entire new controller set for ajax functions. 4) Something else? How does everyone else provide ajax / rich functionality while preserving non-js useability? Help! |
Messages In This Thread |
Non-Javascript Friendly Site - by El Forum - 11-20-2010, 03:10 PM
Non-Javascript Friendly Site - by El Forum - 11-20-2010, 03:46 PM
Non-Javascript Friendly Site - by El Forum - 11-20-2010, 03:46 PM
Non-Javascript Friendly Site - by El Forum - 11-20-2010, 03:57 PM
Non-Javascript Friendly Site - by El Forum - 11-20-2010, 04:03 PM
Non-Javascript Friendly Site - by El Forum - 11-20-2010, 04:16 PM
Non-Javascript Friendly Site - by El Forum - 11-20-2010, 09:22 PM
Non-Javascript Friendly Site - by El Forum - 11-21-2010, 03:55 AM
Non-Javascript Friendly Site - by El Forum - 11-25-2010, 11:27 PM
Non-Javascript Friendly Site - by El Forum - 11-26-2010, 03:50 AM
Non-Javascript Friendly Site - by El Forum - 11-26-2010, 06:36 AM
Non-Javascript Friendly Site - by El Forum - 04-19-2011, 09:22 AM
Non-Javascript Friendly Site - by El Forum - 04-19-2011, 01:28 PM
Non-Javascript Friendly Site - by El Forum - 04-19-2011, 04:48 PM
Non-Javascript Friendly Site - by El Forum - 04-19-2011, 05:01 PM
|