Only one window open

K

Kamyk

Hello all again!

On the main form I have a few fields and among of them there is button which
opens additional window (named "Links") where user can delete and add data
from the database.
I want this user let open (from the main form) only one subform "Links". I
hope you know what I mean. An example of my idea is Winamp program, which in
the default version opens only once and
when somebody wants to open two Winamp programs in the same time it is
rather impossible or settings change is then needed. I do not even know in
what language it is possible to do, maybe in javascript.

Thank you in advance for your posts
Best and kind regards
Marcin from Poland
 
K

kaeli

On the main form I have a few fields and among of them there is button which
opens additional window (named "Links") where user can delete and add data
from the database.
I want this user let open (from the main form) only one subform "Links". I
hope you know what I mean. An example of my idea is Winamp program, which in
the default version opens only once and
when somebody wants to open two Winamp programs in the same time it is
rather impossible or settings change is then needed. I do not even know in
what language it is possible to do, maybe in javascript.

Is this an application for the web, a GUI written in Java, a .NET
application, or...?
Winamp is written for Windows. It is not an internet application. It can
directly integrate with Windows API calls.

This is not feasible for the internet (which is by it's very nature
stateless). The others, sure, but not with javascript (unless you're talking
..net, and even then C# would be better for a windows forms app).

Honestly, you should code your back end so that multiple instances don't kill
it, regardless of front-end GUI. Make your back-end robust, scalable, and not
easily killed. Anything else will get you into trouble later.

--
 
R

RobG

kaeli said:
Is this an application for the web, a GUI written in Java, a .NET
application, or...?
Winamp is written for Windows. It is not an internet application. It can
directly integrate with Windows API calls.
[...]

I think you may have missed the point. My reading is that the
OP is looking for a re-usable pop-up window and that WinAmp was
used as an example of a program that if you try to start a
second instance, it just keeps using the current one.

There is a thread here that may help:

<URL:http://groups-beta.google.com/group...f0b46b5?q=reuse+popup+window#104e8bcd2f0b46b5>

or search this new group for:

"Closing a popup before opening another"
 
T

Tomasz Cenian

Kamyk napisa³(a):
Hello all again!

On the main form I have a few fields and among of them there is button which
opens additional window (named "Links") where user can delete and add data
from the database.
I want this user let open (from the main form) only one subform "Links". I
hope you know what I mean.

<button onclick="if (!w) w=window.open()">Open</button>

To things:
1. make sure variable 'w' is declared before this function gets triggered

2. Additional code (and not 100% reliable) is needed if you want the
user to be able to reopen the popup window after once closing it.
 
T

Tomasz Cenian

Kamyk napisa³(a):
Hello all again!

On the main form I have a few fields and among of them there is button which
opens additional window (named "Links") where user can delete and add data
from the database.
I want this user let open (from the main form) only one subform "Links". I
hope you know what I mean.

<button onclick="if (!w) w=window.open()">Open</button>

Two things:
1. make sure variable 'w' is declared before this function gets triggered

2. Additional code (and not 100% reliable) is needed if you want the
user to be able to reopen the popup window after once closing it
(without refreshing the main window)
 
K

kaeli

I think you may have missed the point. My reading is that the
OP is looking for a re-usable pop-up window and that WinAmp was
used as an example of a program that if you try to start a
second instance, it just keeps using the current one.

But if I start a second window in IE, it *will* allow 2 (or more) instances
of that page.
I think the OP was looking for a singleton instance, which simply cannot be
100% ensured in a web app (at least I haven't found of a way or heard of
one...).

Perhaps I musunderstood the question. I do that sometimes.

--
--
~kaeli~
"No matter what happens, somebody will find a way to take
it too seriously."
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top