Simple frame.location.href question

C

ChrisC

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.
 
D

Daz

ChrisC said:
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.
 
A

ASM

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;">
 
C

ChrisC

ASM said:
ChrisC a écrit :

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;">

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

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

ASM

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';
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
44,998
Latest member
MarissaEub

Latest Threads

Top