473,396 Members | 1,900 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Browser refresh causes loss of context

2
Hi all,
I have this weird problem while developping a website.. Hope somebody can shed some light on this...

Main page has a frameset with onload() that calls a Javascript. This script sets up a collection of objects, say "CollectionA".
Frameset has two frames:
- FrameA with navigation, onclick() which sets the SRC of FrameB
- FrameB

When click in FrameA, a HTML is loaded in FrameB. That HTML invokes a script that uses "CollectionA", by using something like
Expand|Select|Wrap|Line Numbers
  1. abc = top.CollectionA; lencol = abc.length; 
All this works fine. When I now push the browsers refresh button, the script called by HTML in FrameB gets stuck on
Expand|Select|Wrap|Line Numbers
  1. abc.length
Obviously, context of top.CollectionA has been lost. WHY ??? Debugging shows is still knows about top, its href, its own href etc.
Funny thing is that - when I click in FrameA, FrameB is loaded and works correctly...

Help !!!!!
Feb 21 '10 #1
1 1482
PBong
2
Found why....
F5 makes all frames reload their current source. For data context to work, these sources need to be invoked via the hierarchy.
Moving the SRC of the Frame statement to a script invoked by the FRAMES onload() solves this problem.
Feb 23 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: tasmisr | last post by:
This is an old problem,, but I never had it so bad like this before,, the events are refiring when clicking the Browser refresh button. In the Submit button in my webform, I capture the server side...
4
by: Charlie | last post by:
Hi: When I change an image, but keep same title, then upload image to hosting server, my browser will display old image until I refresh. If I close browser, then open same page again, I have to...
0
by: Brad White | last post by:
Overview: I have a custom web app that has an 'Inbox' that refreshes every 30 seconds. One user uses Outlook to host the web page. Using IE, the refresh works fine. If the user is working in...
17
by: SamSpade | last post by:
picDocument is a picturebox When I do picDocument.Invalidate() the box paints. But if instead I do picDocument.Refresh() the box does not paint. What does Refresh do. I guessed it did an...
2
by: Kapil Jain | last post by:
Dear All, I would like to disable back and forward button + Refresh button. Please help in doing this. I want this because i am displaying data from mysql database and on back and forward button...
15
by: tshad | last post by:
I was looking for a way to handle refreshes (user pressed refresh button) and found a piece of code to check if a Web page was refreshed but I can't get it to work. The code is:...
27
by: David Golightly | last post by:
This is just a quick poll for all you web devs out there: What browsers do you test on/are concerned about compatibility with? Obviously, you're going to test on current-generation browsers such...
2
by: voodooman | last post by:
hi any help,advice,tips etc are greatly appreciated. i've got an ashx page being called to handle the displaying of an Word doc. - .NET 2.0, c#, running local on XP Pro ...
0
by: Moe Sisko | last post by:
Using ASP.NET 2.0 . When a certain button is pressed on Page "A", I perform some server side processing, then call Page.ClientScript.RegisterStartupScript to attach some javascript, which...
6
by: Andrew Poulos | last post by:
I'm building a app in which opens in a new window without a menu bar or tool bar. I need to warn users (who press the F5 key or Ctrl+R) that refreshing may result in loss of data and to give them...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.