Simple frame.location.href question

Discussion in 'Javascript' started by ChrisC, Dec 11, 2006.

  1. ChrisC

    ChrisC Guest

    I have a nice simple page - navigation frame on the left, main panel on
    the right -

    <frameset cols = "20%, 80%">
    <frame src="LeftPanel.aspx" id="leftFrame" name="leftFrame"
    width="20%" height="100%" frameborder="0" scrolling="no" />
    <frame src="Default.aspx" id="RightFrame" name="RightFrame"
    width="80%" height="100%" frameborder="0" scrolling="no" />
    </frameset>

    Trouble is, when I try to redirect the frame on the right to a
    differerent URL it is not updating all the time. It is typically the
    same page but with a different URL parameter e.g.
    Default.aspx?postdate=01012006 to Default.aspx?postdate=08012006

    Im assuming its some kind of caching bug but ive tried putting nocache
    directives in the page to no avail. I've reproduced this in IE 6, IE 7
    and Firefox2.
    ChrisC, Dec 11, 2006
    #1
    1. Advertising

  2. ChrisC

    Daz Guest

    ChrisC wrote:

    > I have a nice simple page - navigation frame on the left, main panel on
    > the right -
    >
    > <frameset cols = "20%, 80%">
    > <frame src="LeftPanel.aspx" id="leftFrame" name="leftFrame"
    > width="20%" height="100%" frameborder="0" scrolling="no" />
    > <frame src="Default.aspx" id="RightFrame" name="RightFrame"
    > width="80%" height="100%" frameborder="0" scrolling="no" />
    > </frameset>
    >
    > Trouble is, when I try to redirect the frame on the right to a
    > differerent URL it is not updating all the time. It is typically the
    > same page but with a different URL parameter e.g.
    > Default.aspx?postdate=01012006 to Default.aspx?postdate=08012006
    >
    > Im assuming its some kind of caching bug but ive tried putting nocache
    > directives in the page to no avail. I've reproduced this in IE 6, IE 7
    > and Firefox2.


    Can we see a little bit more of the actual JavaScript code? It's quite
    hard to spot a problem without being able to see the code.

    Thanks.

    Daz.
    Daz, Dec 11, 2006
    #2
    1. Advertising

  3. ChrisC

    ASM Guest

    ChrisC a écrit :
    > I have a nice simple page - navigation frame on the left, main panel on
    > the right -
    >
    > <frameset cols = "20%, 80%">
    > <frame src="LeftPanel.aspx" id="leftFrame" name="leftFrame"
    > width="20%" height="100%" frameborder="0" scrolling="no" />
    > <frame src="Default.aspx" id="RightFrame" name="RightFrame"
    > width="80%" height="100%" frameborder="0" scrolling="no" />
    > </frameset>
    >
    > Trouble is, when I try to redirect the frame on the right to a
    > differerent URL it is not updating all the time. It is typically the
    > same page but with a different URL parameter e.g.
    > Default.aspx?postdate=01012006 to Default.aspx?postdate=08012006


    Curious that works fine for me (Firefox) and would for everyone.

    test :
    http://stephane.moriaux.perso.wanadoo.fr/truc/frames_n_variables/
    with something as your links (postdate=01012006)

    <a href="Default.aspx?postdate=08012006" target="RightFrame">

    or

    <a herf="#"
    onclick="parent.RightFrame.location='Default.aspx?postdate=08012006';
    reurn false;">

    --
    Stephane Moriaux et son (moins) vieux Mac déjà dépassé
    Stephane Moriaux and his (less) old Mac already out of date
    ASM, Dec 11, 2006
    #3
  4. ChrisC

    ChrisC Guest

    ASM wrote:
    > ChrisC a écrit :
    > > I have a nice simple page - navigation frame on the left, main panel on
    > > the right -
    > >
    > > <frameset cols = "20%, 80%">
    > > <frame src="LeftPanel.aspx" id="leftFrame" name="leftFrame"
    > > width="20%" height="100%" frameborder="0" scrolling="no" />
    > > <frame src="Default.aspx" id="RightFrame" name="RightFrame"
    > > width="80%" height="100%" frameborder="0" scrolling="no" />
    > > </frameset>
    > >
    > > Trouble is, when I try to redirect the frame on the right to a
    > > differerent URL it is not updating all the time. It is typically the
    > > same page but with a different URL parameter e.g.
    > > Default.aspx?postdate=01012006 to Default.aspx?postdate=08012006

    >
    > Curious that works fine for me (Firefox) and would for everyone.
    >
    > test :
    > http://stephane.moriaux.perso.wanadoo.fr/truc/frames_n_variables/
    > with something as your links (postdate=01012006)
    >
    > <a href="Default.aspx?postdate=08012006" target="RightFrame">
    >
    > or
    >
    > <a herf="#"
    > onclick="parent.RightFrame.location='Default.aspx?postdate=08012006';
    > reurn false;">
    >
    > --
    > Stephane Moriaux et son (moins) vieux Mac déjà dépassé
    > Stephane Moriaux and his (less) old Mac already out of date


    The link itself is popualted in some .net code, but an example would be

    javascript:parent.frames["RightFrame"].location.href =
    'Default.aspx?postDate=11122006'
    ChrisC, Dec 11, 2006
    #4
  5. ChrisC

    ASM Guest

    ChrisC a écrit :
    >
    > The link itself is popualted in some .net code,


    No importance, we have only to know what the browser will read
    (resulting html code)

    > but an example would be
    >
    > javascript:parent.frames["RightFrame"].location.href =
    > 'Default.aspx?postDate=11122006'


    where it is displayed ?
    in the href of a link ?

    try (with no ") :

    javascript:parent.frames['RightFrame'].location.href =
    'Default.aspx?postDate=11122006';

    or :

    javascript:parent.RightFrame.location.href =
    'Default.aspx?postDate=11122006';



    --
    Stephane Moriaux et son (moins) vieux Mac déjà dépassé
    Stephane Moriaux and his (less) old Mac already out of date
    ASM, Dec 11, 2006
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Leon
    Replies:
    1
    Views:
    10,176
    Boban Dragojlovic
    Jun 24, 2003
  2. Marcello

    window.open location.href frame

    Marcello, Nov 12, 2003, in forum: Javascript
    Replies:
    4
    Views:
    247
    Marcello Console
    Nov 20, 2003
  3. saiho.yuen
    Replies:
    3
    Views:
    411
    kaeli
    Sep 14, 2004
  4. Replies:
    2
    Views:
    446
  5. Alex Bird
    Replies:
    3
    Views:
    171
    Thomas 'PointedEars' Lahn
    May 9, 2008
Loading...

Share This Page