atar.yosef Posted November 17, 2009 Share Posted November 17, 2009 Hi for all!! <html><body><iframe src="http://www.google.com/" width="100%"></iframe><iframe src="http://www.gmail.com/" width="100%"><iframe><iframe src="http://www.mediafire.com/" width="100%"><iframe></body></html> There are some sites like "mediafire.com" and "gmail.com" that when I put them into the <iframe> element and use the browser to open the page, instead of the page will open in its frame as the statement in the source code request, it is opened in the whole browser window. Can someone help me to know how to avoid this? Link to comment Share on other sites More sharing options...
Ingolme Posted November 17, 2009 Share Posted November 17, 2009 You can't stop that. They don't want their pages in a frame, so they have a code that prevents that. Link to comment Share on other sites More sharing options...
jeffman Posted November 17, 2009 Share Posted November 17, 2009 Specifically, Gmail has the following code in a script:if (top.location != self.location) { top.location = self.location.href;}This obliterates your frame structure and replaces the contents of the whole window (top.location) with their page. It can't be stopped. It seems unfair, I realize, but remember that frames are deprecated. Link to comment Share on other sites More sharing options...
atar.yosef Posted November 17, 2009 Author Share Posted November 17, 2009 Very thanks for all my fellows who bother themself and dedicated from their time in order to help me!!!Have a great nice day!!! :) Link to comment Share on other sites More sharing options...
atar.yosef Posted November 17, 2009 Author Share Posted November 17, 2009 Specifically, Gmail has the following code in a script:if (top.location != self.location) { top.location = self.location.href;}This obliterates your frame structure and replaces the contents of the whole window (top.location) with their page. It can't be stopped. It seems unfair, I realize, but remember that frames are deprecated.Hello you!!Firstly thanks you about your response!!! Secondly, is this script code that you gave here writed at Javascript?In addition, I didn't understand why did you say that frames are deprecated while at the W3school's tutorial this is not mentioned. Link to comment Share on other sites More sharing options...
Ingolme Posted November 17, 2009 Share Posted November 17, 2009 The tutorial mentions that they are permitted in Transitional and Frameset DTDs but not allowed in the Strict DTD.Both the Transitional and Frameset DTDs are only around to ensure backwards compatibility with pages that were developed many years ago. Link to comment Share on other sites More sharing options...
thescientist Posted November 17, 2009 Share Posted November 17, 2009 and the code they use is written in Javascript. Link to comment Share on other sites More sharing options...
atar.yosef Posted November 17, 2009 Author Share Posted November 17, 2009 and the code they use is written in Javascript.Thanks you about your kind answer!!! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.