Solved

VbScript to Close window

Posted on 2003-10-27
4
15,624 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
Comment Utility
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
Comment Utility
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
Comment Utility
x_com,

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

Thanks.
0
 
LVL 29

Expert Comment

by:David H.H.Lee
Comment Utility
you're welcome, Gurnain

Regards
x_com
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

762 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now