473,651 Members | 3,024 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Javascript popup window refresh'ing?

I have a page that automaticly opens a small popup window, but it is
only supposed to open this window once. A little info:

function openwindow(name _var) {
if (!name_var) {
name_var = window.open(... );
}
}

First of: Is that at all posible? To have a variable that holds the
name of the new window, and if that variable is not set, then open the
window, and will the new window opened have the name of the content of
the variable (confused? so am I)...

OR:

Can I, in the new window, do so it is imposible to refresh that
window, 'cause it refreshes when the top function tries to open it
again...?

Hope this was enough info, otherwise I'd be glad to write some more...

Hopefully I can get som help on this topic.

Thank's in advance.

- Jeppe
Jul 23 '05 #1
3 3135
Not exactly sure what your asking, but if you have a window open and then
open another window with the same name, it will put the new page in the
window with the same name . If there is not a window with that name, it will
create a new one.

"Jeppe bob Dyrby" <je***@yfu.dk > wrote in message
news:b5******** *************** **@posting.goog le.com...
I have a page that automaticly opens a small popup window, but it is
only supposed to open this window once. A little info:

function openwindow(name _var) {
if (!name_var) {
name_var = window.open(... );
}
}

First of: Is that at all posible? To have a variable that holds the
name of the new window, and if that variable is not set, then open the
window, and will the new window opened have the name of the content of
the variable (confused? so am I)...

OR:

Can I, in the new window, do so it is imposible to refresh that
window, 'cause it refreshes when the top function tries to open it
again...?

Hope this was enough info, otherwise I'd be glad to write some more...

Hopefully I can get som help on this topic.

Thank's in advance.

- Jeppe

Jul 23 '05 #2
Hmm... I wasn't totally clear then :p
Is there any way to stop the browser from openening a popup with the
same name as one that already exists?
If, for example: The opener window tries to open a popup window, but
there's already one with the same name, as the one it tries to open,
can I stop it from openening the same page in the same popup window?

- Hope that was a bit more info... :)
- Jeppe

"Camazing.c om" <no****@camazin g.com> wrote in message news:<Qu******* *************@a delphia.com>...
Not exactly sure what your asking, but if you have a window open and then
open another window with the same name, it will put the new page in the
window with the same name . If there is not a window with that name, it will
create a new one.

Jul 23 '05 #3
Jeppe bob Dyrby wrote:
Hmm... I wasn't totally clear then :p
Is there any way to stop the browser from openening a popup with the
same name as one that already exists?
Broadly no, in a practical sense, yes. That is, if you opened the
windows and gave them names then you are in a potion to record what you
have done and examine the references to those windows to see if they
have been closed or are still open, and make decisions about how to act
based on that information. However, if a window with an identical name
has already been created (say by a previous page/site) then you will not
know anything about it (and probably won't care much either).
If, for example: The opener window tries to open a popup window, but
there's already one with the same name, as the one it tries to open,
can I stop it from openening the same page in the same popup window?
Yes.
- Hope that was a bit more info... :)


It is more information, but whether it is enough information is another
matter. People write code to specifications, which are specific. If you
want to be told how to do something you will have to try to be specific
about what it is you want to do (and probably why). As it is, we get to
the point of determining that a window with a given name has been opened
and a URL loaded, and determine that it is still open, and so "stop it
from openening the same page in the same popup window", but does that
mean that the code is expected to just do nothing, or is the idea to
open a new URL in a distinct window?

But opening pop-up windows is not necessarily that good an idea to start
with due to the existence of diverse pop-up blocking mechanisms. Some
idea of the context of the application would allow for an assessment of
the significance of pop-up blocking (and accompanying required
additional testing) along with the proposition of alternative
approaches.

<snip top-post>

Please don't top post to comp.lang.javas cirpt (see the FAQ).

Richard.
Jul 23 '05 #4

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

Similar topics

4
2457
by: fartsniff | last post by:
Hello all. Can someone help out ? I found this PHP code that works just fine, however, I am trying to put it back into its original Javascript form. I am still learning the syntax, etc. for Javascript, so I'm not really sure what needs to be removed and kept. I was trying the basic search/replaces, but always ended up with Javascript errors.
26
6810
by: Raffi | last post by:
Hi, We have a database application that runs in a popup Internet Explorer application window. The reason for this is to isolate the casual user from the address bar and the typical IE navigation buttons. The application has a browser test page that displays an error message when a popup blocker is found and opens a popup page stating the test was successfull if there is no popup blocker.
6
5578
by: ged | last post by:
Hi, i am a oo (c#) programmer, and have not used javascript for a while and i cant work out how javascript manages its references. Object References work for simple stuff, but once i have an object collection and stanrd using it it starts to fall apart. Clearly there is something about javascript's usage of passing "By ref" that i am not getting. i have had a look on the web and found some examples, but i cant see why my code does not...
14
2917
by: daveyand | last post by:
Hey guys, I've spent abit of time searching th web and also this group and cant seem to find a solution to my issue. Basically i want to get the current url, and then replace http:// with something else. Here is the current code.
10
1362
by: Martin Eyles | last post by:
Hi, I am getting a string passed back from a web form in the format name1:variable1;name2:variable2... I would like to split this up into several variable, such that the variable names are name1, name2 etc. (I actually know what these names are) and the values of the variables are variable1, variable2 etc. I tried using split to split the string into an array at the semicolons, and
28
3024
by: Noone Here | last post by:
AIUI, it was not all that long ago when the threat to personal users, was attachments that when executed compromised machines with keyloggers, trojans, etc. Now it seems that the big problem is reading a webpage or an HTML e-mail and getting affected through the scripting. My understanding is that the script downloads the malicious program from the web and sets it to run on start up through the start-up folder or in the registry. I...
7
9599
by: Coder | last post by:
Hi I have the following code in java script, it is not giving proper output in FIREFOX but running fine in IE... can anybody help me out to make this run in FIREFOX . <script language="JavaScript"> var cntlName; var eleTarget = document.getElementById('hiding'); function showOrHide(){
1
1153
by: Oren | last post by:
Hi, I need to know how much time has left from this meta: <meta id="ref" http-equiv="refresh" content="300;url="/> any idea ?
1
16045
by: HopfZ | last post by:
Is it possible to open an external page in background? window.open('http://www.google.com/search?q='+Math.random()); window.focus(); I tried the above code in three browsers: Firefox 2 - opens google in new tab. but focus does not get back to the original tab. Firefox behaves as if window.focus() is not there. Opera 9 - opens google in new background tab. Good.
0
8361
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8278
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,...
0
8701
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 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...
1
8466
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,...
0
7299
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, 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...
1
6158
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5615
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();...
0
4144
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
1912
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.