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?
Printable View
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.
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.Quote:
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';
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;
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>
I wasn't suggesting you emulate them :)How?Quote:
Originally Posted by jscheuer1
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: What does the ?1 do?Quote:
Looks like it instructs some type of server side language to tailor that script file to that page in some manner. However, the generated code appears to be identical in this case to wikibits.js without the query and to wikibits.js?2.
Since .js is generally not a server side extension, it could have some other purpose, like causing the file to be read from the server again instead of from the user's cache if called again as -say, wikibits.js?2.