SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Wizard silver trophy KLB's Avatar
    Join Date
    Nov 2003
    Location
    Maine USA
    Posts
    3,781
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Odd problem with JavaScript that breaks out of frames

    I have used the following scripts to cause my pages to automatically break out of frames:
    if (window != top){ top.location = self.location;}
    if (self!= top){ top.location = self.location;}

    The odd thing is that MSIE 6.0 always gets tripped up by these script once and reloads the page. To the user this just causes a momentary blip in their page display, however, it also causes Google AdSense to reload artificially inflating my impressions. Now this doesn't cause a crisis problem as AdSense only pays by clicks. It does, however, hurt my ability to get a realistic count of how many AdSense impressions I'm getting.

    Does anybody know of a routine that will automatically break one's site out of frames without causing MSIE to always refresh the page?
    Ken Barbalace: EnvironmentalChemistry.com (Blog, Careers)
    InternetSAR.org
    Volunteers Assist Search and Rescue via Internet
    My Firefox Theme: Classic Compact
    Based onFirefox's default theme but uses much less window space

  2. #2
    SitePoint Wizard silver trophy KLB's Avatar
    Join Date
    Nov 2003
    Location
    Maine USA
    Posts
    3,781
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Update to my problem. It does not appear to be caused by my JavaScript routines that break my site out of someone elses frames. I can't pin the problem down, but it appears to be the way MSIE 6.0 is handling my onLoad event and my use JavaScript to set the "display" style of some DIV tags--very odd.

    I sent an email to Google AdSense folks, maybe they've noticed this same problem with other sites.
    Ken Barbalace: EnvironmentalChemistry.com (Blog, Careers)
    InternetSAR.org
    Volunteers Assist Search and Rescue via Internet
    My Firefox Theme: Classic Compact
    Based onFirefox's default theme but uses much less window space


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
  •