SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Apr 2007
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    IE7 and parent.location not working?

    Hi,

    In a script used by svg, I have a like like the following to go to a new web page:


    Code:

    Code:
    parent.location.href = newUrl;
    This works fine in IE6. However, it has no effect in ie7 (not even a error message, or security message) It just does nothing.
    I have noised when i do:

    Code:
    alert(loc + "?" + entityName); parent.parent.location = loc + "?" + entityName; alert(parent.parent.location.href);
    values displayed by alert are not the same!!! parent.parent.location was not overwritten.

    (I tried window.location=, window.assign(newUrl), parent.location.href, parent.location= .... none of it works, and I don't get an error message)
    Project uses Frames.

    Is this expected behavior in ie7? Is this a security thing? Where is there information on this?

    Thanks,
    MR

  2. #2
    SitePoint Member
    Join Date
    Apr 2007
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    --------------------------------------------------------------------------------

    I was able to work around the problem by having a script in my page that was called from svg.

    You can call a script function that resides on the page from a svg script.

    I just put a function like

    Code:
    gotoUrl(u) { parent.location.href = u; }
    on the main page and called this from SVG.

    Thank you very much for your suggestion , it puts me on a right tracks.

    But it is a workaround, I still do not understand the couse of the problem.


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
  •