HartleySan Posted August 1, 2011 Share Posted August 1, 2011 I'm creating a site that uses mostly Ajax. Now that the Ajax layer is working, I'm actually planning on going back and adding a non-Ajax layer. I know that's backwards from what is in Larry's book, but it'll work and isn't too hard to do. The one issue is with the home page. All other pages are loaded with Ajax when a link is clicked, but the home page is loaded using the window.onload event. So my question becomes the following: If possible, I want to use Ajax to load the home page content, but if that's not possible, how can I fallback to the all-PHP option? Or am I thinking about things oddly here? Would it be best to avoid the onload event for the home page and always used just PHP to load the home page? Thank you. Link to comment Share on other sites More sharing options...
Jonathon Posted August 1, 2011 Share Posted August 1, 2011 If your going to build in a non ajax layer, then won't you have a php version if you can't create an ajax object and have an ajax layer ready if the object can be created. So aren't you covered anyway? Link to comment Share on other sites More sharing options...
HartleySan Posted August 1, 2011 Author Share Posted August 1, 2011 Admittedly so, I didn't think this through very well when I posted the question. After thinking about it a bit more, I was able to come up with a reasonable solution, and yeah, Jonathon, you're right. Thanks. Link to comment Share on other sites More sharing options...
Jonathon Posted August 1, 2011 Share Posted August 1, 2011 No problem Link to comment Share on other sites More sharing options...
Recommended Posts