Is it possible to load full web pages with AJAX and how would I go about it?
I’m thinking that I can create individual pages as I normally would, and then use AJAX somehow to get that page, and present it where the user currently is. Is that the correct assumption to make?
Basically I’m aiming to make a more dynamic site, so when the user clicks an option it will scroll down and reveal the requested info, without a noticeable page redirect.
Any advice would be great.
Thanks.
Jquery’s .load(url) method loads HTML direct into an element. So if you changed every <a> tag to be a .load() on your top-level element you could do this. It would be a bit like using frames, but targeting a DIV instead of a frame.
Of course it would break lots of things like the back-button, form handling etc etc unless you put a lot of work in.
So, like the doctor who when told “It hurts when I do this” replied “well don’t do that then”, the answer is probably “dont do that”.