axum Posted April 15, 2003 Posted April 15, 2003 Hi, after running through my processing, i need a click of the "Close" button to exit the whole program, and close the browser....Any ideas? Cheers Axum Quote
bungpeng Posted April 15, 2003 Posted April 15, 2003 Just a comment: I never see any web application will "Close" the browser. Maybe because browser is not part of the program actually, so we should not close the browser, except there is a sub window... For example: you login Yahoo mail and check your mail, after logoff, you expect Yahoo to close the browser for you? How if user want to use this browser for other thing? Quote
axum Posted April 15, 2003 Author Posted April 15, 2003 eh? well the user can't use the browser for anything else!! that's a decision, i as the programmer, has made! You CAN close it by just adding this to the OnClick event : Response.Write("<script>window.close();</script>"); but then IE comes up with with a Yes/No confirmation message, anyone know if you can just close it without this confirmation? Axum Quote
*Gurus* Derek Stone Posted April 15, 2003 *Gurus* Posted April 15, 2003 It is in no way proper to close a browser window unless it was opened by a web page as an auxiliary window. Either open an auxiliary window and close that, or deal with the all-too-appropriate security that's built into browsers. The fact that the user has your web page loaded doesn't give that page any right to control the browser it's being displayed in. Quote Posting Guidelines
axum Posted April 15, 2003 Author Posted April 15, 2003 it does in an internal secure intranet environment surely? and yes, it is opened by another browser... but i take it there is NO way of getting round this YES/NO dialog box...? Axum Quote
Moderators Robby Posted April 15, 2003 Moderators Posted April 15, 2003 Yes there is a way, if it's an auxiliary window (as Derek just said). I'll try and find a sample later today. Quote Visit...Bassic Software
axum Posted April 15, 2003 Author Posted April 15, 2003 which this is....an auxillary window...that would be fantastic mate :) many thanks Axum Quote
Moderators Robby Posted April 15, 2003 Moderators Posted April 15, 2003 The answer is here http://www.visualbasicforum.com/showthread.php?threadid=41897&highlight=prompt Quote Visit...Bassic Software
axum Posted April 15, 2003 Author Posted April 15, 2003 many thanks mate, can't believe it's as simple as that one line :) Ah well, gotta know your javascript i guess! Axum Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.