How can I open my Default.aspx page without Addressbar, Menubar & Statusbar?
A:
You can't.
However, you can create a popup windows without the bars in Javascript using open
method, like this:
open("MyPage.aspx", "MyWindow", "toolbar=no,status=no,menubar=no");
SLaks
2009-12-18 03:38:24
I know with new popup windows its working, But i want to know any methods available for the default page...
Sauron
2009-12-18 03:42:28
As I said, you can't.
SLaks
2009-12-18 03:48:41
+1
A:
Remember it's the user with an already-opened web browser that chooses to visit your website, effectively Default.aspx page, whether or not the browser is launched by you or a program while testing your website. So a bit of client-side/JavaScript "magic" is needed to modify or fake the desired result based on an already existing browser window...
Using JavaScript, you can launch a new window with those features turned off, and close the old window. For example, IE's window.open(..) args are specified here.
It provides an example
varCustomFeatures = 'titlebar=no, status=no,menubar=no,resizable=yes, scrollbars=no,toolbar=no,location=no,directories=no,left=0,top=0,height=';
window.open(windowURL, '_blank' , varCustomFeatures,true);
Details may vary between browser in which case you will likely need to employ browser detection.
John K
2009-12-18 03:39:43
But in some browsers( like IE6 ) it asks a confirmation when closing that old window. Is there any method to avoid the confirmation?
Sauron
2009-12-18 03:45:16
No, you can't. How would you like it if a website suddenly closed your browser? Also, remember that the user might visit your site in Firefox with 50 tabs open.
SLaks
2009-12-18 03:49:37
@SLaks: Tabs is a exceptionally good point. Spawning a new windows and closing the user's main window predates tabs. Likely trying to close the old window nowadays is not a good idea.
John K
2009-12-18 04:18:15