IE7 and parent.location not working?

Discussion in 'Bing' started by camer38, Apr 23, 2007.

  1. #1
    Hi,

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


    
    
    parent.location.href = newUrl;
    
    
    Code (markup):
    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:

    
    
    alert(loc + "?" + entityName); 
    parent.parent.location = loc + "?" + entityName; alert(parent.parent.location.href);
    
    Code (markup):

    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
     
    camer38, Apr 23, 2007 IP
  2. camer38

    camer38 Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    --------------------------------------------------------------------------------

    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.
     
    camer38, Apr 24, 2007 IP