473,322 Members | 1,473 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,322 software developers and data experts.

How to reload a whole frameset with Opera

After my web page has been loaded I'm doing some tests with a JavaScript. If
I figure out that something is wrong I'd like to reload the whole frameset.

With Internet Explorer and Mozilla Firefox I can reload the whole frameset
with
parent.location.href = "index.html";

However, this doesn't work with Opera.
Does someone know how to do that with Opera?

Stefan
Nov 23 '05 #1
6 6626

Try top.location.href or just window.location.reload();.

Danny
Nov 23 '05 #2
> Try top.location.href or just window.location.reload();.

Unfortunately it doesn't work.
top.location.href = "index.html"; works exactly same like
parent.location.href = "index.html";
That means, in Internet Explorer and Mozilla Firefox the frameset gets
reloaded and in Opera it doesn't work.
window.location.reload(true); reloads the current frame and not the whole
frameset.

Perhaps I have the ask my question a little bit more precise.
index.html has the frameset with two frames (frame1.html and frame2.html).
Within frame1 I'd like to reload the whole frameset (index.html) with a
JavaScript. With parent.location.href = "index.html"; or top.location.href
= "index.html"; it works fine with Internet Explorer and Mozilla Firefox but
not with Opera.

Stefan
Nov 23 '05 #3
> Try top.location.href or just window.location.reload();.

Unfortunately it doesn't work.
top.location.href = "index.html"; works exactly same like
parent.location.href = "index.html";
That means, in Internet Explorer and Mozilla Firefox the frameset gets
reloaded and in Opera it doesn't work.
window.location.reload(true); reloads the current frame and not the whole
frameset.

Perhaps I have to ask my question a little bit more precise.
index.html has the frameset with two frames (frame1.html and frame2.html).
Within frame1 I'd like to reload the whole frameset (index.html) with a
JavaScript.
With parent.location.href = "index.html"; or top.location.href =
"index.html"; it works fine with Internet Explorer and Mozilla Firefox but
not with Opera.

Stefan
Nov 23 '05 #4

Stefan Mueller wrote:

Perhaps I have to ask my question a little bit more precise.
index.html has the frameset with two frames (frame1.html and frame2.html).
Within frame1 I'd like to reload the whole frameset (index.html) with a
JavaScript.
With parent.location.href = "index.html"; or top.location.href =
"index.html"; it works fine with Internet Explorer and Mozilla Firefox but
not with Opera.


It works for me.

What is the Opera version and O.S.?
Do you get an error in the console?
What if anything does happen?
Can you display your code?
--
S.C.

Nov 23 '05 #5
>> With parent.location.href = "index.html"; or top.location.href =
"index.html"; it works fine with Internet Explorer and Mozilla Firefox
but
not with Opera.
It works for me.

What is the Opera version and O.S.?

The newest version (8.5 Build 7700) for Windows (Windows 2000).
Do you get an error in the console? No errors
What if anything does happen? Not the expected page (index.html) gets loaded. Opera reloads the actual
page again and again.
Can you display your code?

Of course.
Actually, while trying to reproduce my problem in a simple way I figured out
that my problem doesn't happen if I use the local files. It only happens if
the files are on a web server (and like mentioned only with Opera).

Please have a look:
http://web.seekware.ch/test/frame
If you press the Next button, frame 1b will be shown but because the input
box is '0' the frameset index.html gets reloaded (because of the
JavaScript). I know this doesn't make really sense. However, in my project I
use an input box in a second frame to verify if everything is fine or if the
frameset (index.html) has to be reloaded again.
If you press several times the Next button Opera doesn't reload the frameset
(index.html) but it does reload all the time frame 1b.
(PS:If you don't experience that problem try to change the value '0' to '1'
and press Next, do a reload on the browser, go back and forward with the
browser buttons, ...)

I guess it's something like a caching problem. However, it's really very bad
because with Opera my pages sometimes gets uninterruptable reloaded.

And here's the code:
--------------------------------------------------

index.html
=======
<html>
<frameset rows = "50%, 50%">
<frame src="frame1a.html" name="MyFrame1">
<frame src="frame2.html" name="MyFrame2">
</frameset>
</html>

--------------------------------------------------

frame1a.html
=========
<html>
<body>
Frame 1a
<input type = "button" value = "Next" onClick = "document.location.href
= 'frame1b.html'">
</body>
</html>

--------------------------------------------------

frame1b.html
=========
<html>
<head>
<script type = "text/javascript">
function FormLoaded() {
if (parent.MyFrame2.document.MyForm2.MyInput2.value == 0) {
parent.location.href = "index.html";
}
}
</script>
</head>

<body onLoad = "FormLoaded()">
Frame 1b
</body>
</html>

--------------------------------------------------

frame2.html
========
<html>
<body>
<form name = "MyForm2" action = "" method = "post">
<input type = "text" name = "MyInput2" value = "0"
</form>
</body>
</html>
Nov 23 '05 #6

Stefan Mueller wrote:

Please have a look:
http://web.seekware.ch/test/frame
If you press the Next button, frame 1b will be shown but because the input
box is '0' the frameset index.html gets reloaded (because of the
JavaScript). I know this doesn't make really sense. However, in my project I
use an input box in a second frame to verify if everything is fine or if the
frameset (index.html) has to be reloaded again.
If you press several times the Next button Opera doesn't reload the frameset
(index.html) but it does reload all the time frame 1b.
(PS:If you don't experience that problem try to change the value '0' to '1'
and press Next, do a reload on the browser, go back and forward with the
browser buttons, ...)

I guess it's something like a caching problem. However, it's really very bad
because with Opera my pages sometimes gets uninterruptable reloaded.

And here's the code:
--------------------------------------------------

index.html
=======
<html>
<frameset rows = "50%, 50%">
<frame src="frame1a.html" name="MyFrame1">
<frame src="frame2.html" name="MyFrame2">
</frameset>
</html>

--------------------------------------------------

frame1a.html
=========
<html>
<body>
Frame 1a
<input type = "button" value = "Next" onClick = "document.location.href
= 'frame1b.html'">
</body>
</html>

--------------------------------------------------

frame1b.html
=========
<html>
<head>
<script type = "text/javascript">
function FormLoaded() {
if (parent.MyFrame2.document.MyForm2.MyInput2.value == 0) {
parent.location.href = "index.html";
}
}
</script>
</head>

<body onLoad = "FormLoaded()">
Frame 1b
</body>
</html>

--------------------------------------------------

frame2.html
========
<html>
<body>
<form name = "MyForm2" action = "" method = "post">
<input type = "text" name = "MyInput2" value = "0"
</form>
</body>
</html>
More likely a timing problem I think. When you perform this test:
if (parent.MyFrame2.document.MyForm2.MyInput2.value = 0)


there's no certainty that the document in frame2 is loaded, and if not
it may be triggering a reload of the *currently specified pages*.
If the purpose of this test is to ensure that frame2 is loaded, there
are probably better ways like testing first for the existence of a
variable and then the value to which it is set on load.

--
S.C.

Nov 23 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Derek Ross | last post by:
Hello, Say I have a server that's saving the CPU temperature to 'temperature.js' once a second. The contents of the file is one single line: var temperature = "35.5"; And it changes as...
3
by: John Willingham | last post by:
Hi, Any assistance with the following would be greatly appreciated. I am deep linking to a site that is built with frames and I would like to find a script that I can share with the remote...
1
by: Christopher Benson-Manica | last post by:
In the course of trying to solve the scrollbar problem in my previous post, I came up with the following code. It works in that it changes the scrolling attribute for the frame I'm interested in,...
1
by: Deasun O'Donnachadha | last post by:
Good morning all, I have a page that has a frameset with three frames. It is called Default.aspx. This is the main way into my app. On a page in the main frame, thats the right frame, of the...
0
by: Guadala Harry | last post by:
I have an aspx page that opens as a modal dialog. The aspx contains two IFrames (ID = thumbFrame and mainFrame). From the code-behind of the page that loads in mainFrame I want to cause the page...
5
by: David T. Ashley | last post by:
Hi, I have an application where I use a left frame to navigate to another page in the main frame. After I've done this, when I use "RELOAD" in the browser, it goes back to the original page...
2
by: ericisjusteric | last post by:
I have a page with multiple iframes and need to have the user (ie6) be able to click a button to refresh any one of the iframes - but also to click another button at the top of the page to refresh...
1
by: ll | last post by:
I'm currently working on a form which consists of a show and hide javascript. The toggle works fine, although when I click on submit, I would like the page to reload with the toggle (show/hide)...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.