473,403 Members | 2,366 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,403 software developers and data experts.

Firefox related question

Hi

I should admit at the beginning that I love FireFox very much. But
recently there were two FF related issues that bothered me, and I had
no idea.

The first one is how to use javascript to close the FF window. I can
use window.close() to close the children window, but I can't close the
parent window. In IE, you can close parent window through
window.close() with a warning message. So I am wondering if there is a
setting in FF so that I can close the parent window using
window.close().

The second one is a little bit complicated. I have a couple of pages
and on each page there is a timer. At the beginning, everything is
normal and it works pretty well. After I submitted a form and get
response from server, there is a progress bar in the status bar of FF.
The duration of the progress bar depends on the delay of my timer. I
set it to be 1 second. So I will see a progress bar in each second.
It looks like the page is refreshing itself in each second.

Thanks!

Nov 2 '06 #1
4 2203
ja********@gmail.com said the following on 11/2/2006 5:58 PM:
Hi

I should admit at the beginning that I love FireFox very much. But
recently there were two FF related issues that bothered me, and I had
no idea.

The first one is how to use javascript to close the FF window.
You can't in 2.0. View the Error Console and it will explain it quite
simply by the message it gives:

"Scripts may not close windows that were not opened by script."

I can use window.close() to close the children window, but I can't close the
parent window. In IE, you can close parent window through
window.close() with a warning message.
<script type="text/javascript">
window.opener = "Anything You want";
window.close();
</script>

No warning in IE.
But opening a site to have it close your window is about as user
friendly as trying to steal there bank information.
So I am wondering if there is a setting in FF so that I can
close the parent window using window.close().
Fortunately, no.
The second one is a little bit complicated. I have a couple of pages
and on each page there is a timer. At the beginning, everything is
normal and it works pretty well. After I submitted a form and get
response from server, there is a progress bar in the status bar of FF.
The duration of the progress bar depends on the delay of my timer. I
set it to be 1 second. So I will see a progress bar in each second.
It looks like the page is refreshing itself in each second.
Don't use the status bar for things the status bar weren't meant to be
used for and you don't have that "issue". And FF has a setting so that
you can't fool with the status bar.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 2 '06 #2
<script type="text/javascript">
window.opener = "Anything You want";
window.close();
</script>

No warning in IE.
But opening a site to have it close your window is about as user
friendly as trying to steal there bank information.
Actually there is a warning message if you try to close the window that
is not opened by script in IE, and the window will be closed after you
confirm it. I guess the window will not be closed if I cancel it.
So I am wondering if there is a setting in FF so that I can
close the parent window using window.close().

Fortunately, no.
Bummer! This is bad news for me! :(
>
Don't use the status bar for things the status bar weren't meant to be
used for and you don't have that "issue". And FF has a setting so that
you can't fool with the status bar.
I didn't mean to use that status bar. I am just wondering why there is
a progress bar in the status bar. I need to avoid that progress bar or
at least disable the status bar.

Thanks again for sharing your knowledge!

Nov 2 '06 #3
I didn't mean to use that status bar. I am just wondering why there is
a progress bar in the status bar. I need to avoid that progress bar or
at least disable the status bar.
In this issue, I have a timer, upon which I can get the time
information updated in one div on my page. I didn't rewrite the whole
page, just assign a new innerHTML for that div. Does this rewrite will
affect the progress bar?

Nov 2 '06 #4
ja********@gmail.com said the following on 11/2/2006 6:34 PM:
><script type="text/javascript">
window.opener = "Anything You want";
window.close();
</script>

No warning in IE.
But opening a site to have it close your window is about as user
friendly as trying to steal there bank information.
Actually there is a warning message if you try to close the window that
is not opened by script in IE, and the window will be closed after you
confirm it. I guess the window will not be closed if I cancel it.
No, if you cancel it then the window won't close. The snippet I posted
worked - for a very long time - in IE and I honestly didn't test it in
my IE7 to see if it still worked but it doesn't - which is a good thing.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 3 '06 #5

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

Similar topics

4
by: Stuart Perryman | last post by:
Hi, I have the following code which works just fine in IE6 but not in Firefox. It is an extract of several table rows each with an individual form. It is generated by php. <form...
8
by: fuzzyman | last post by:
I have a very odd problem that has boggled my head. I've been trying to get a 2 column layout working with CSS. The problem seems to occur with the use of the <script> tag in the document, not the...
11
by: Ben Holness | last post by:
Hi all, I am having some trouble with some table code. It works fine in Internet Explorer, but the layout doesn't work correctly in Firefox 1.0.7 Is this a firefox bug, or am I missing...
3
by: zakhan | last post by:
I have an XSL file that uses hiveware_enkoder javascript to hide an email address. This is a snippet from the xsl file: <script type="text/javascript"> //&lt;!]&gt; </script> This renders...
5
by: Gaby | last post by:
i was informed that one of out pages wasnt working. the user was on firefox and said our page wasnt functioning but whenever i use IE it works fine. is there any reason or something in the code...
4
by: somewildmonkey | last post by:
I'm running Firefox version 1.5.0.6 and when I load an html file containing the code shown below, although both the text field and the button are defined as 24 pixels in height, the text field is...
28
by: Wladimir Borsov | last post by:
The HTML source of one of my web pages starts simplified with a code like: ---- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> ..... <BODY BACKGROUND="images/myback.gif"> <div...
3
by: SAL | last post by:
Hello, I did google this issue and found some stuff related to BrowserCaps section of either web.config or machine.config but it didn't work. It seems that most pages in my webapp are okay but a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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.