You are here : Blog
Search_Blog Minimize

KHSW Soft Blog Minimize

If you want to close the main browser window, Internet Explorer will popup this messagebox:

"The Web page you are viewing is trying to close the window.
Do you want to close this window?"

Internet Explorer is checking the window.opener object to see if the current window has been opened by another window. If not, it will display this question.

So, the little trick is to make sure that the window.opener object differs from undefined ;-)

<script language="javascript">
function CloseWindow() {
window.opener = 'http://kHSw.blogspot.com';
window.close();
}
</script>

Don't you hate it when a program just reboots Windows without asking after an installation? I do.

Today I found a little program on the web that will prevent this shutdown. It's called Anti-Shutdown by xCAT-Industries. The program itself can be downloaded from http://www.xcat-industries.nl/softwareinfo.php?software=37.

 

When a customer gets a messagebox (for example an errormessage), they mostly take a printscreen, copy this bitmap in a Word-document and send it to my already overloaded mailbox.
Those customers who do think about my mailbox size, are manually typing the text from the messagebox in an email.

It's much easier to just copy the text of the messagebox to the clipboard by pressing
<Ctrl>-<C>.
You'll get something like this (an example coming from the Database Configuration Application of Microsoft Content Management Server):


---------------------------Stop service?---------------------------In order to continue, the IIS service and all dependent services must be stopped. Do you want to stop IIS now? Answering No will exit this program.---------------------------Yes No ---------------------------

This is one of the Stored Procedures I use frequently: CREATE PROCEDURE sp_kill_database_users @arg_dbname sysname with recompile AS -- kills all the users in a particular database -- dlhatheway/3M, 11-Jun-2000 declare @a_spid smallint declare @msg varchar(255) declare @a_dbid int select @a_dbid = sdb.dbid from master..sysdatabases sdb where sdb.name = @arg_dbname declare db_users insensitive cursor for select sp.spid from master..sysprocesses sp where sp.dbid = @a_dbid open db_users fetch next from db_users into @a_spid while @@fetch_status = 0 begin select @msg = 'kill '+convert(char(5),@a_spid) print @msg execute (@msg) fetch next from db_users into @a_spid end close db_users deallocate db_users GO

...

Read More »


Copyright 2007 by KHSW Soft BVBA
Privacy StatementTerms Of Use