Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Tabbed Document Viewer does not work with Wikipedia

  1. #1
    Join Date
    Aug 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Tabbed Document Viewer does not work with Wikipedia

    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?

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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

  3. #3
    Join Date
    Aug 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jscheuer1
    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.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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):

    Code:
    if (location!=top.location)
    top.location.href='nameOfThePage.htm';
    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    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!

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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:

    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>
    Launch it in your browser. If the page breaks out, it has the code to do so.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. #7
    Join Date
    Dec 2006
    Location
    Near Derby, UK
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up

    Quote Originally Posted by Twey View Post
    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;


    Worked sweeeeet for me. Thanks Dude.

  8. #8
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I wasn't suggesting you emulate them
    Quote Originally Posted by jscheuer1
    this could also possibly be done server side
    How?
    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!

  9. #9
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by Twey View Post
    Originally Posted by jscheuer1
    this could also possibly be done server side
    I wasn't suggesting you emulate them How?
    If by no other means, then an include. There might be others. But, I did say 'possibly', meaning in this case, "I'm not sure but, maybe." Sorry for any confusion my imprecise wording may have caused anyone.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  10. #10
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •