Posted on 2010-11-11
I used to build all my web based apps using frames, later I switched to iframes, and now it seems that iframes are not very well accepted (XHTML Strict), so I switched to object tag.
Internet explorer, does not behave well with <object> tag, It does weird things that other browsers don't. (I hate it).
Today I "discovered" Jquery, and it's UI plugin excellent tool. However there is something that concerns me.
let's say that I have the following code.
In some point of the code I add some action for a click event, that loads div "x" with code from another html document using jquery's load function.
It works like a charm, however.. what happens to the <html> head styles scripts etc.. from the other page?
Are they lost?, combined?.. should I avoid adding lots of stuff on these areas on the page to be loaded on to a div?.. In general what are the best practices when using this load() techinque..?
I could create some server side script that sends only "body".. but it would require to recode many many old code..
So my main concern is: is it correct to send a complete HTML document including body head scripts styles etc.. as a response to the load() function?