I am attempting to create preview panes on a page which need to have their own separate stylesheets, and as such need to be loaded as external documents (or at least, I can't think of another way to do it).

I have set up a couple of iframes -- ideally I'd sooner use objects to stay strict, however they seem like a nasty and even more opaque data structure -- and have tried a few methods to get the data to show up. As far as I can tell, the load call works fine, firebug shows the post and response, however there is no joy.

I wouldn't have thought it would be a cross-domain problem since they should be loading from the same server, however I have also tried dynamically creating the iframes just in case.

This works when #preview is a div:

$('#preview').load('myurl', data);

but it stuffs up the CSS. It does not work, and neither it should, if #preview is an iframe. However, I thought something like

$('body[0]', $('#preview')).load('myurl', data);

might do the trick. It didn't of course.

Thus far there is no combination of jQuery and regular DOM scripting that has yielded positive results, and I'm beginning to wonder if it is all some kind of extremely long-running April Fools' prank.

There's got to be some simple way to do this, so what am I overlooking?

TIA

--
Duncan Anker
Server 101, Web Hosting & E-Commerce
http://www.server101.com

Reply via email to