?
Solved

VbScript to Close window

Posted on 2003-10-27
4
Medium Priority
?
16,220 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 29

Accepted Solution

by:
David H.H.Lee earned 120 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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 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 informatio…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

777 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