Hi
IE6 Win2k
The javascript FAQ describes how you can retain a reference to a window that
you have opened and manipulate the window - focus on it or close it, viz:
4.10 How do I check to see if a childwindow is open, before opening another?
var myWin=null;
function openWin(aURL) {
if (!myWin || myWin.closed ) {
myWin=window.op en(aURL,'myWin' );
} else{
myWin.location= aURL;
myWin.focus();
}
}
However, javascript variables appear to be reinitialised each time the
browser window
is refreshed so the mechanism described by the FAQ seems to be defeated if
the user refreshes the page.
a) Is it true that javascript variables are reinitiliised when the page is
refreshed?
b) If a) then is there some other way to monitor a child window from another
browser window despite user refreshes?
Thanks
Mike May 2 1829
Mike May wrote: Hi
IE6 Win2k
The javascript FAQ describes how you can retain a reference to a window that you have opened and manipulate the window - focus on it or close it, viz:
4.10 How do I check to see if a childwindow is open, before opening another? var myWin=null; function openWin(aURL) { if (!myWin || myWin.closed ) { myWin=window.op en(aURL,'myWin' ); } else{ myWin.location= aURL; myWin.focus(); } }
However, javascript variables appear to be reinitialised each time the browser window is refreshed so the mechanism described by the FAQ seems to be defeated if the user refreshes the page.
Yep :)
a) Is it true that javascript variables are reinitiliised when the page is refreshed?
Tis indeed the truth. Easy to test to.
alert(b)
b = "ok, it has a value now"
alert(b)
and then refresh the page......
b) If a) then is there some other way to monitor a child window from another browser window despite user refreshes?
Use a cookie or sessions.
--
Randy
"Mike May" <ma*@dial.pipex .com> writes: Hi
IE6 Win2k
The javascript FAQ describes how you can retain a reference to a window that you have opened and manipulate the window - focus on it or close it, viz:
4.10 How do I check to see if a childwindow is open, before opening another? var myWin=null; function openWin(aURL) { if (!myWin || myWin.closed ) { myWin=window.op en(aURL,'myWin' ); } else{ myWin.location= aURL; myWin.focus(); } }
However, javascript variables appear to be reinitialised each time the browser window is refreshed so the mechanism described by the FAQ seems to be defeated if the user refreshes the page.
a) Is it true that javascript variables are reinitiliised when the page is refreshed?
Yes. There is no differene between
b) If a) then is there some other way to monitor a child window from another browser window despite user refreshes?
Only very trickily.
If you try to open a window again with the same name, and it already
exists, you will be given a new reference to the window. It will probably
also change the content of the window.
If you control the content of the opened window, you can have it keep
check of its parent and write its own reference back to it. That is hard
to time correctly though.
/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
'Faith without judgement merely degrades the spirit divine.' This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Sven Dzepina |
last post by:
Hi All,
how I can make a simply HostWatch - system which use a mysql DB and send me
an e-Mail if the Server goes off and again on?
I began to programm this last night, but the MySQL inquiry is too hard for
me! =(
Thats my code:
----
|
by: JSheble |
last post by:
I have a windows service that in the OnStart it creates a thread and runs a
loop forever and ever, assuming the service is running. The loop stops
during the OnStop event, and everything works exactly as expected.
I also have an application that monitors that service using the
ServiceController component, and allows me to start & stop the service as
needed, as well as poll for it's current status. Still everything thus far
works and...
|
by: Elizabeth Harmon |
last post by:
hi All,
I dont know if this is possible, so i am asking
Is there a Way to monitor a connection when it is fetching on a web page? I
am providing a status Bar and process to my users so they can see something
is happening?
I would like to do a while loop as in
|
by: Greg |
last post by:
Hi,
I've designed a bookmark in Ajax / PHP that I will put soon on
sourceforge.net.
But I've got an very tricky bug.
I try it on some computers with Internet Explorer/Windows, Firefox
1.07/Linux, Firefox 1.5/Linux, Firefox 1.5/Windows and Firefox 1.5/Mac,
Safari/Mac.
It works perfectly on a lot of configurations but, on some PC with
Firefox 1.5/Windows (not all), the Javascript code with XmlHttpRequest
|
by: Simon Wigzell |
last post by:
I have a little asp progress bar window that I open up with javascript,
sized and located, all the extras turned off. It works by refreshing itself
every second and displaying how much a file upload has progressed. (This is
a paid for 3rd party thing so don't ask me to change the way it works!) Even
though I have "status=no" in the javascript window.open statment it has a
status bar and every second the status bar does its thing where it...
| |
by: Frances |
last post by:
Firefox is not respecting window.status, examples in this pg
http://www.csua.berkeley.edu/~jgwang/jsform02.htm
are ignored by Firefox.. why is this.. is there a solution.. thank you..
Frances
|
by: The Numerator |
last post by:
How do you modify the status bar? (The status bar is the bar on the
bottom in IE. It should read "Done" now.) I'm pretty sure, this
requires JavaScript. Thanks.
|
by: FAQ server |
last post by:
-----------------------------------------------------------------------
FAQ Topic - I have window.status="Moomin"; why doesn't the statusbar change?
-----------------------------------------------------------------------
When changing the status in an event (e.g. onmouseover) you
should return true from the event. Also a number of browsers
require a short delay before setting the status to overcome their
default behaviour with the...
|
by: mistral |
last post by:
Is there some other (more advanced) effects for status bar, other than
standard Scroller Bar, TypeWriter Scroller, Flashing Bar, Decrypter,
Ticker, World Clock?
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |