Solved

VbScript to Close window

Posted on 2003-10-27
4
15,817 Views
Last Modified: 2010-05-18
Hi,

I actually have a close button, where when i click, the window should close. However, this is what i have:

<INPUT type="submit" value="Close" name=Submit onclick="window.close()">

but it gives me a popup message, which i DO NO want.

Please advice.

0
Comment
Question by:Gurnain
  • 2
  • 2
4 Comments
 
LVL 29

Accepted Solution

by:
David H.H.Lee earned 30 total points
ID: 9627965
Gurnain,
I also face the same problems. You should try this to avoid the annoying pop-up message before close the window:
Eg:
<INPUT type="submit" value="Close" name=Submit onclick="javascript:closeWin()">

<script language="javascript">
function closeWin()
{
  window.opener=self;
  window.close;
}
</script>

Regards
x_com
0
 

Author Comment

by:Gurnain
ID: 9627987
x_com,

I think, i have been working with little thing for a long time. However, it still doesn't close my window.

Any suggestions.
0
 

Author Comment

by:Gurnain
ID: 9628012
x_com,

I got it. I was missing the brackets: window.close()

Thanks.
0
 
LVL 29

Expert Comment

by:David H.H.Lee
ID: 9628045
you're welcome, Gurnain

Regards
x_com
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question