JS that both refreshes a page, and also loads into a frame?

J

jamesmgregg68

I'm somewhat of a JS dummy, so any help here is appreciated.

I have a page with multiple iFrames that load like main, secondary, and
tertiary menus -
click Link A or B in frame #1, it loads a page ("ay.htm" or "bee.htm")
in frame #2.
click Link C, D or E in frame #2, it loads a page in frame #3.
click Link F, G, H, or I in frame #3, it loads a page in frame #4.

Let's say I clicked Link B in frame #1, and opened a bunch of submenus
in the other 3 iFrames.

The problem is, if I've drilled down that far and then go back to frame
#1 and click Link A, I still see all the Link B submenu content.

I added a simple JS button so the user can click and refresh the entire
page back to nothing, but knowing end-users they don't always work that
way.

So....
How can I make it so if the user clicks Link A or B at any time, it
both refreshes the entire page (and therefore clears all the content in
frames #2-4), AND loads the requested document into frame #2?

Or is there an easier way to do this?
 
N

Neredbojias

To further the education of mankind, (e-mail address removed) vouchsafed:
I'm somewhat of a JS dummy, so any help here is appreciated.

I have a page with multiple iFrames that load like main, secondary, and
tertiary menus -
click Link A or B in frame #1, it loads a page ("ay.htm" or "bee.htm")
in frame #2.
click Link C, D or E in frame #2, it loads a page in frame #3.
click Link F, G, H, or I in frame #3, it loads a page in frame #4.

Let's say I clicked Link B in frame #1, and opened a bunch of submenus
in the other 3 iFrames.

The problem is, if I've drilled down that far and then go back to frame
#1 and click Link A, I still see all the Link B submenu content.

I added a simple JS button so the user can click and refresh the entire
page back to nothing, but knowing end-users they don't always work that
way.

So....
How can I make it so if the user clicks Link A or B at any time, it
both refreshes the entire page (and therefore clears all the content in
frames #2-4), AND loads the requested document into frame #2?

Or is there an easier way to do this?

One thing I always wanted to try and never did was "about:blank" in the
iframe. If that doesn't work, you could append a hash or query string to
the url.
 

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,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top