I was thinking, when I want to load AJAX content that has its own scripts and CSS to be loaded and executed, how do I format that content to be loaded?
Do I still keep the <head> and <body> tags in the document or does it not matter anymore?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The strategy is to load partial pages, just the content that is needed and to use jQuery.live() or a similar method of making sure your javascript events work for the additional content. As was stated before you really want to only have one set of scripts and probably one css file for everything. A lot of frameworks provide the ability to load these partial pages easily, but I’m not sure what your stack is.