1) Script Title: FF1+ IE5+ Opr7+ Tabbed Document Viewer
2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...bdocviewer.htm
3) Describe problem: The script does not work with Wikipedia.com. Not sure, why? Can anyone help, please?
1) Script Title: FF1+ IE5+ Opr7+ Tabbed Document Viewer
2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...bdocviewer.htm
3) Describe problem: The script does not work with Wikipedia.com. Not sure, why? Can anyone help, please?
Not a bug. Most likely Wikipedia has code on their pages to 'break out of frames'. Either that or, you made an error implementing the script.
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
How do I check if they have code to 'break out of frames'? I have not changed the script, so I could not have made any errors implementing it.Originally Posted by jscheuer1
No need, I did. They do.
Generally (in javascript) this is done by code like this (there are many variations and this could also possibly be done server side):
So, you can search for this code and its many variations on the page and all the scripts linked to the page. Or just put the page in an iframe. If it breaks out, it has code to break out of frames on it.Code:if (location!=top.location) top.location.href='nameOfThePage.htm';
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
It does. http://en.wikipedia.org/skins-1.5/common/wikibits.js?1 says:Code:// Un-trap us from framesets if (window.top != window) window.top.location = window.location;
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Well then, it's official. If a page breaks out of an iframe, there is no other reason than it having code to do so. To test a page in this manner just make up a fresh page with nothing on it but:
Launch it in your browser. If the page breaks out, it has the code to do so.Code:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <iframe src="pages's address here" width="200" height="200" scrolling="auto" frameborder="1"></iframe> </body> </html>
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
I wasn't suggesting you emulate themHow?Originally Posted by jscheuer1
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
To break out of frames?
I don't believe it's possible, although there may be some obscure HTTP status code about which I haven't heard.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Bookmarks