ID:154175
 
One of my new projects keeps a dynamic list of open browser windows so that when one is updated, all the players that have that window open may see the change. The only problem comes when someone closes the window with the "X" button on the window title bar. When someone updates the window, it will pop back up.

I used a little javascript ( ) to tell BYOND when the page is unloaded, but it even counts as an unload event when the page is updated by the BYOND program!

I could make my own close button on the page, but I would really like to be able to use the already present close button. People are going to use it to close windows whether or not I want them to, and wonder why the window keeps coming back (even if it is in the documentation :P).

Is there a way to tell from within BYOND if an IE window with a specific name exists? Does anyone have a different approach for this problem?
I just turned off the X button, and provide my own close buttons in every popup window.

-AbyssDragon
In response to AbyssDragon
Ah! I didn't realize I could turn off the close button and still leave the minimize and title bar. Your post made me take a second closer look at the reference. :)
In response to AbyssDragon
AbyssDragon wrote:
I just turned off the X button, and provide my own close buttons in every popup window.

-AbyssDragon

Can that be defeated with ctrl-w?
In response to Skysaw
Can that be defeated with ctrl-w?

Good question. I hadn't considered that.

Tests say... no. Disabling the close button also disables that command. Yay!

-AbyssDragon
In response to AbyssDragon
Unfortunately it disables the minimize button too. I can live with that though.
In response to Shadowdarke
Shadowdarke wrote:
Unfortunately it disables the minimize button too. I can live with that though.

I had mentioned this on the forums before, but I never got a response from Tom or Dan!

Z
In response to Shadowdarke
Aren't there any java commands you can use as a button to minimize the screen? They've got java commands for everything else! :oP If there is one, you could remove the titlebar and make your own instead...
In response to Foomer
You can remove the close button without sacrificing the title bar. I like the title bar because it make it easy to move the window. If I find a javascript command to minimize the window I'll post it here for future reference. :)

[edit]
Found one here: http://htmlgoodies.com/beyond/minmax.html
In response to Zilal
There have been several things they haven't responded to lately. I guess they are just really busy. Maybe if you and I make enough noise we can get the minimize button back! ;)
In response to AbyssDragon
sorry to bring upa old thread, but does anyone know how to do this, i cant find the code, :( boo
and i cant find out how to make Dream maker know when it has been closed. (isnt there a library in byondscape about this?)
Maz
In response to Maz
I never got it to detect when a window is open, but I use a BYOND link to close the window through BYOND. Within the program, I keep a list of windows each player has open and BYOND removes the window from the list when it is closed through the BYOND link.

I left the normal Windows close button (The little X in the corner) so I could still have the minimize button. If they close the window with the normal Windows close button, it is not removed from the list so the window will pop back up on the next update. In BTG, this is actually kind of helpful. You can close the window to get it out of the way and the moment someone updates it, the window opens back up.
In response to Shadowdarke
cool, but i need a far more simplified version of that, im just looking for a way to get DM to know that a pop up has been closed and then will carry on with the rest of the proc :D
But thatsnks anyway