Can't send frame to a URL a second time IN IE5...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mandy

    Can't send frame to a URL a second time IN IE5...

    This fails only in IE 5. It works flawlessly in IE5.5+[s], Netscape[s], Opera[s] and Mozilla[s].

    I'm using javascript to navigate in my content. I can load the starting page just fine (page0.html). Any subsequent use of the below
    function does nothing.

    I'm testing tURL, and it contains the correct URL (page1.html), and also testing that parent.frames.m oduleFrame.loca tion.href
    returns the current page's URL, which it does.

    Code:

    function redrawPage(){
    var tURL;
    if(this.modType == "lesson")
    tURL = "page" + this.currentPag e + ".html";
    else
    tURL = "moduleDisplay. html";
    parent.frames.m oduleFrame.loca tion.href = tURL;
    }

    These pages do employ document.write to write contents.

    PLEASE help!


  • VK

    #2
    Re: Can't send frame to a URL a second time IN IE5...

    > parent.frames.m oduleFrame.loca tion.href = tURL;

    try instead:
    window.top.modu leFrame.locatio n.href=tURL
    (more reliable)

    Also "this" is a very fancy girl sometimes, acting rather like "that"
    (meaning "hell knows what I'm pointing to"). Except referencing the parent
    form from within a form element, I'd suggest always use the object name
    itself (unless you are extending the "window" object and this function is a
    method of your customary object, which I cannot tell from this snip).

    After that it should work.


    Comment

    • Mandy

      #3
      Re: Can't send frame to a URL a second time IN IE5...

      It is being used in a custom object, which is the "this", in this case. The object is used to maintain state on the client-side.

      I can't go from window.top as this frameset could be nested 4-40 deep, and I will have no control over the number of levels... only
      the direct relationship between the target frame and it's parent.

      What could possibly cause a frame which is known to exist, and can be queried for name/id, to not allow location.href assignment
      and also not throw an error?

      BTW: thank you for your quick response to my original.



      "VK" <schools_ring@y ahoo.com> wrote in message news:4159975f$0 $28207$9b622d9e @news.freenet.d e...[color=blue][color=green]
      > > parent.frames.m oduleFrame.loca tion.href = tURL;[/color]
      >
      > try instead:
      > window.top.modu leFrame.locatio n.href=tURL
      > (more reliable)
      >
      > Also "this" is a very fancy girl sometimes, acting rather like "that"
      > (meaning "hell knows what I'm pointing to"). Except referencing the parent
      > form from within a form element, I'd suggest always use the object name
      > itself (unless you are extending the "window" object and this function is a
      > method of your customary object, which I cannot tell from this snip).
      >
      > After that it should work.[/color]


      Comment

      • VK

        #4
        Re: Can't send frame to a URL a second time IN IE5...

        > parent.frames.m oduleFrame.loca tion.href = tURL;

        This statement is using the "Sloppy Joe's Syntacs" - maybe IE 5.0 is just
        less tolerant as other browsers?

        Try the conventional syntacs:
        parent.frames(' moduleFrame').l ocation.href=tU RL

        Tell me if it helps.



        Comment

        • Michael Winter

          #5
          Re: Can't send frame to a URL a second time IN IE5...

          On Wed, 29 Sep 2004 13:51:17 +0200, VK <schools_ring@y ahoo.com> wrote:

          [snip]
          [color=blue]
          > Try the conventional syntacs:
          > parent.frames(' moduleFrame').l ocation.href=tU RL[/color]

          That isn't conventional. The frames collection is just that: a collection.
          It is not a function[1]. Use square brackets:

          frames['moduleFrame']

          [snip]

          Mike


          [1] Some browsers might allow it, but it's probably just to be compatible
          with IE. Square brackets should be supported by all browsers.

          --
          Michael Winter
          Replace ".invalid" with ".uk" to reply by e-mail.

          Comment

          • VK

            #6
            Re: Can't send frame to a URL a second time IN IE5...

            My bad!
            A Microsofted thinking eventually gets you: slow but sure :-)


            Comment

            • Mandy

              #7
              Re: Can't send frame to a URL a second time IN IE5...

              Cleaned it up and it still didn't work.

              Strange quirk: I notice that if I [SHIFT]+click on the link that calls the function, while it does open a page in a new window, the
              ORIGINAL windows DOES advance to the correct URL.

              WTH?!?!?


              "VK" <schools_ring@y ahoo.com> wrote in message news:415ae53f$0 $25784$9b622d9e @news.freenet.d e...[color=blue]
              > My bad!
              > A Microsofted thinking eventually gets you: slow but sure :-)
              >
              >[/color]


              Comment

              • VK

                #8
                Re: Can't send frame to a URL a second time IN IE5...

                Do you have a link to look at?

                Also just for a hell of it check that all test browsers have equal security
                settings.


                Comment

                Working...