I am currently designing a webpage, and the left fram has a is a 6-cell table that is being used as a navigation tool. The table currently uses Javascript to visually keep track of the current choice and open the specified target fram to the right. My problem occurs when a user has a page open and hits the refresh button. The page refreshes, but the menu bar on left resets to "Home", the default value on loading. Is there anyway so that the page can refresh but the options along top stay the same? here is the address of my site: www.grapescape.net. Thanks for any assistance!
Problem with Menu when user Refreshes Frame
Collapse
This topic is closed.
X
X
-
netgrooverTags: None -
Erwin Moller
Re: Problem with Menu when user Refreshes Frame
netgroover wrote:
[color=blue]
> I am currently designing a webpage, and the left fram has a is a 6-cell
> table that is being used as a navigation tool. The table currently uses
> Javascript to visually keep track of the current choice and open the
> specified target fram to the right. My problem occurs when a user has a
> page open and hits the refresh button. The page refreshes, but the menu
> bar on left resets to "Home", the default value on loading. Is there
> anyway so that the page can refresh but the options along top stay the
> same? here is the address of my site: www.grapescape.net. Thanks for any
> assistance![/color]
Hi netgroover,
What you want is a bit strange.
If I hit the refreshbutton I expect the page to refesh, all frames too.
If I want a certain frame to reload only, I'll just refesh that one.
Why do you want the standardbehavio ur to change? Because you have silly
customers who don't know what refresh means?
Teach them.
Regards,
Erwin Moller
-
netgroover
Re: Problem with Menu when user Refreshes Frame
Maybe I did a poor job of explaining my problem...
I have a navigation frame on the left, and a body frame on the right... I use javascript to make change the image buttons on the left (on, off, hover) and to change the target (body) frame on the right. If I click on the "contact" button image, the image is hightlighted, and the body content changes the the contact page. Now, if the user hits refresh, the javascript menu resets to "home", but the current body frame still shows the "contents" page. How do I retain the image variable in my navigation frame when the user refreshes (frames page).
Thank you for any useful comments.
Comment
-
Erwin Moller
Re: Problem with Menu when user Refreshes Frame
netgroover wrote:
[color=blue]
> Maybe I did a poor job of explaining my problem...
>
> I have a navigation frame on the left, and a body frame on the right... I
> use javascript to make change the image buttons on the left (on, off,
> hover) and to change the target (body) frame on the right. If I click on
> the "contact" button image, the image is hightlighted, and the body
> content changes the the contact page. Now, if the user hits refresh, the
> javascript menu resets to "home", but the current body frame still shows
> the "contents" page. How do I retain the image variable in my navigation
> frame when the user refreshes (frames page).
>
> Thank you for any useful comments.[/color]
Aha,
That makes sense, because both pages are just reloaded, so your
content-frame will just reload the last one that was in there.
To correct your problem, you could use an onLoad handler in your
navigationframe .
What you want to achive is that the content-frame conatins the home-html.
Just put in your body tag the handler and let it call some function you
want.
<body onLoad="someFun ction()">
<script type="text/javascript">
function someFunction(){
parent.frames["contentfra me"].location="home .html";
}
</script>
Something like that should make sure that the contentframe will show what
you want.
Regards,
Erwin
Comment
Comment