Question about Javascript and HTML frame redirection

A

Anthony P

Hello Everyone,

I have an HTML page that has two frames. When the user clicks the
'logout' link, I need to redirect the frames to a single page. So, in
other words, both frames will disappear and will be replaced by just a
single, unframed page.

How can this be done? I'm sure it'd be through Javascript but I don't
really know where to start.

Thanks!
Anthony
 
R

RoLo

Hello Everyone,

I have an HTML page that has two frames. When the user clicks the
'logout' link, I need to redirect the frames to a single page. So, in
other words, both frames will disappear and will be replaced by just a
single, unframed page.

How can this be done? I'm sure it'd be through Javascript but I don't
really know where to start.

Thanks!
Anthony
try:
top.document.location.href="http://www.example.com/single.html";
 
T

Thomas 'PointedEars' Lahn

RoLo said:
I have an HTML page that has two frames. When the user clicks the
'logout' link, I need to redirect the frames to a single page. So, in
other words, both frames will disappear and will be replaced by just a
single, unframed page.

How can this be done? I'm sure it'd be through Javascript but I don't
really know where to start.
[...]
try:
top.document.location.href="http://www.example.com/single.html";

window.top.location = ....

is more reliable and not subject to the SOP. However,

window.parent.location = ...

suffices here.

Please trim your quotes.


PointedEars
 

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

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top