Solved

VbScript to Close window

Posted on 2003-10-27
4
15,691 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Dynamic? Dropdown Box 29 71
Update Stored Procedure question 8 48
sql to convert to date IF entry is in date format 4 75
Hide row when retrieving data from database 6 53
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
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…
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

911 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

18 Experts available now in Live!

Get 1:1 Help Now