Web Analytics Made Easy -
StatCounter Remove frame without losing current page - CodingForum

Announcement

Collapse
No announcement yet.

Remove frame without losing current page

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Remove frame without losing current page

    I use the following function to remove the navigation frame-

    function removeframe() {

    var current = window.self.location.href;
    var top = window.top.location.href;

    if (top != current) {
    top = current;
    window.top.location.href = top;
    }
    else if (top == current) {
    history.back(1);
    }
    }

    Problem is it brings up a javascript error during live testing saying 'permission denied'

    Does anyone know what im doing wrong?

    Also, I am currently using the history back to 'readd' the frame again, is there an easier way? (retaining the current page)

    cheeers

    rick

  • #2
    I am guessing that the domains are not the same??
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

    Comment


    • #3
      yip there all on the same page, www.uujmc.worldinfocus.net

      the only thing i can think off is that i use a go.to/uujmc link to reach it, this masks the full link, would this be causing it?

      Comment


      • #4
        ok, noone seems to know how to fix this is there another way of setting up a remove frame?

        Comment


        • #5
          Change your top variable as it is a built-in window object that refers to the outermost window.

          var topURL = window.top.location.href;
          Glenn
          vBulletin Mods That Rock!

          Comment

          Working...
          X