homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

alternative to iframes
pulling content from another domain

 1:10 pm on Mar 12, 2008 (gmt 0)


i found that "dynamic ajax content" script from dynamic drive but it only lets you show pages from your own domain not from another site.
is there anyway to work around this?

from the site
Note: Due to security limitations, the external pages loaded must be from the same domain as the encompassing page. Any external .css and .js files associated with these pages, however, can be from any domain.

i tried it with an external link from another domain, the content shows up but not the css for that page




 1:19 pm on Mar 12, 2008 (gmt 0)

Those are pretty hefty security limitations and you're going to have great difficulty getting around them. Realistically your only option is to use something like PHP (server side programming) to pull the page from the other domain and inject it into your HTML code. This can be done via AJAX if you wish.


 8:10 am on Mar 18, 2008 (gmt 0)


Have you tried this (it works as an alternative to iframe)

<object classid="clsid:25336920-03F9-11CF-8FD0-00AA00686F13"
type="text/html" data="#*$!.htm"
style="width:xxpx;height:xxpx; border:none" border="0">



 8:41 am on Mar 18, 2008 (gmt 0)

hi doosa

thanks for the suggestion, one question though, where do I put the link to the page I want to show in the script?

here? data="#*$!mypage.htm"



 11:27 am on Mar 18, 2008 (gmt 0)

I've seen it previously suggested to abandon iframes. Does the use of an object tag solve whatever problem was created by iframes? What problem, or problems, are caused by iframes?


 6:50 pm on Mar 18, 2008 (gmt 0)



you use this when your server blocke usage of iframe


 7:05 pm on Mar 18, 2008 (gmt 0)

> when your server blocke usage of iframe <

The thing that trouble me about object in IE is that it seems not to be able to recognize the calling document as superior. In FF or Opera, an object or iframe seems to operate within the larger window. And in IE, it seems locked away to itself. I could be wrong. If someone knows otherwise, let me know, please. But if I click on a link in an object in IE, won't the top.location still be inside the object? An iframe won't do that.

Plus, setting up an object in IE continues to reveal the broken DOM if IE. To create an object element at runtime, one has to pass the "clsid" and "type" as part of a longer string to createElement itself, which is weird (the more I look at that, the weirder the spelling seems for, weird). With iframe, it's just iframe, and then load in, src. Simple.


 10:26 am on Mar 19, 2008 (gmt 0)


I am not pointing out at if iframe is good or bad or how good is iframe.
when you cannot use a iframe, there is no point how wonderful it is,its just a work around and definetly iframe is better given a choice - no issues :)

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved