By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,191 Members | 2,190 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,191 IT Pros & Developers. It's quick & easy.

Only one window open

P: n/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. 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

Jul 23 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
In article <d0**********@news.onet.pl>, ma**************@poczta.onet.pl
enlightened us with...
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.

--
--
~kaeli~
What if the Hokey Pokey IS what's it's all about?
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #2

P: n/a
kaeli wrote:
In article <d0**********@news.onet.pl>, ma**************@poczta.onet.pl
enlightened us with...
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.

[...]

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/comp.lang.javascript/browse_frm/thread/bec21b9a095818ca/104e8bcd2f0b46b5?q=reuse+popup+window#104e8bcd2f0b 46b5>

or search this new group for:

"Closing a popup before opening another"
--
Rob
Jul 23 '05 #3

P: n/a
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.


--
tomasz cenian tcenian at wa dot home dot pl
:::: :: : : http://cenian.boo.pl : : :: ::::
Jul 23 '05 #4

P: n/a
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)
--
tomasz cenian tcenian at wa dot home dot pl
:::: :: : : http://cenian.boo.pl : : :: ::::
Jul 23 '05 #5

P: n/a
In article <V8****************@news.optus.net.au>, rg***@iinet.net.auau
enlightened us with...

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

Jul 23 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.