Welcome to Dream.In.Code
Become an Expert!

Join 150,391 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,056 people online right now. Registration is fast and FREE... Join Now!




exit button

2 Pages V  1 2 >  
Reply to this topicStart new topic

exit button

zai
4 Mar, 2008 - 09:41 PM
Post #1

New D.I.C Head
*

Joined: 17 Feb, 2008
Posts: 20


My Contributions
i know this is the most stupid question. how to do coding to close a window? exit button.. plss, i'm stuck here. at least give me a site where i can learn more about this.
User is offlineProfile CardPM
+Quote Post

bhandari
RE: Exit Button
4 Mar, 2008 - 10:37 PM
Post #2

D.I.C Addict
Group Icon

Joined: 31 Jan, 2008
Posts: 747


Dream Kudos: 900
My Contributions
the site is this

Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.

code.gif
User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: Exit Button
4 Mar, 2008 - 10:41 PM
Post #3

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 9,483



Thanked: 161 times
Dream Kudos: 9075
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
If you're talking about a close link on a popup window then this needs to be in the JavaScript Forum, otherwise what exactly are you talking about?
User is online!Profile CardPM
+Quote Post

zai
RE: Exit Button
4 Mar, 2008 - 10:50 PM
Post #4

New D.I.C Head
*

Joined: 17 Feb, 2008
Posts: 20


My Contributions
my project used microsoft visual studio, asp.net with vb.net 2003. i just want to close the window if the user want's to exit the page. meaning without click "X" to close the window.
User is offlineProfile CardPM
+Quote Post

bhandari
RE: Exit Button
4 Mar, 2008 - 10:53 PM
Post #5

D.I.C Addict
Group Icon

Joined: 31 Jan, 2008
Posts: 747


Dream Kudos: 900
My Contributions
you can call the window.close() method from javascript like:

CODE

<input type="submit" onClick="window.close()">

User is offlineProfile CardPM
+Quote Post

zai
RE: Exit Button
4 Mar, 2008 - 11:15 PM
Post #6

New D.I.C Head
*

Joined: 17 Feb, 2008
Posts: 20


My Contributions
thank you very much. i've made it.. smile.gif
User is offlineProfile CardPM
+Quote Post

bhandari
RE: Exit Button
4 Mar, 2008 - 11:19 PM
Post #7

D.I.C Addict
Group Icon

Joined: 31 Jan, 2008
Posts: 747


Dream Kudos: 900
My Contributions
welcome!!!
Spread the word </DIC>
User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: Exit Button
4 Mar, 2008 - 11:19 PM
Post #8

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 9,483



Thanked: 161 times
Dream Kudos: 9075
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
You need to be aware that if your web application is the only thing open in the browser the user will be prompted asking if they want to close the window or not. Just an FYI smile.gif
User is online!Profile CardPM
+Quote Post

bhandari
RE: Exit Button
4 Mar, 2008 - 11:24 PM
Post #9

D.I.C Addict
Group Icon

Joined: 31 Jan, 2008
Posts: 747


Dream Kudos: 900
My Contributions
QUOTE(PsychoCoder @ 5 Mar, 2008 - 12:49 PM) *

You need to be aware that if your web application is the only thing open in the browser the user will be prompted asking if they want to close the window or not. Just an FYI smile.gif



ya!! that's for IE, Firefox doesn't has that kind of alerts. In fact, I guess firefox will disallow window.close() and the error in error console will be like:

"Scripts may not close windows that not opened by script"
User is offlineProfile CardPM
+Quote Post

zai
RE: Exit Button
4 Mar, 2008 - 11:45 PM
Post #10

New D.I.C Head
*

Joined: 17 Feb, 2008
Posts: 20


My Contributions
i'm using IE, so how to disable the msg asking "do you want to close the window?"
User is offlineProfile CardPM
+Quote Post

bhandari
RE: Exit Button
4 Mar, 2008 - 11:52 PM
Post #11

D.I.C Addict
Group Icon

Joined: 31 Jan, 2008
Posts: 747


Dream Kudos: 900
My Contributions
I think there isn't much you can do, if you are offering your application to a large number of clients.

For a single client, there may be some setting in IE which can help you. I don't know about that. But i'll let you know if i come across it.

This post has been edited by bhandari: 4 Mar, 2008 - 11:52 PM
User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: Exit Button
4 Mar, 2008 - 11:52 PM
Post #12

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 9,483



Thanked: 161 times
Dream Kudos: 9075
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
Unfortunately there is no way to disable that
User is online!Profile CardPM
+Quote Post

2 Pages V  1 2 >
Fast ReplyReply to this topicStart new topic
Time is now: 1/9/09 05:55PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month