Last post Feb 28, 2017 07:15 AM by Eric Du
Feb 27, 2017 10:54 AM|SANJISH KUMAR|LINK
One of my customers wants me to design a login form (600 x 400) and display it in the centre of the windows desktop screen so that the browser is not visible at all. ( ie no menubars , address bars , status bars etc) . I have tried the foll code in
the load_complete event of the form without success
All the browser bars still show
Feb 27, 2017 12:41 PM|PatriceSc|LINK
Which browser are you testing? This kind of behavior likely depend on the browser.
If seeing myself a login window without any address bar showing up and asking my credentials I would likely just quit the site because of security concerns. I would try to understand which benefit the customer try to get by doing that but IMHO it might be
counter productive and cause more harm than good especially if this is not only for internal users knwoing and trusting your site.
Edit: tried window.open("https://www.asp.net/","test","width=50,height=50,toolbar=0"); and it seems to work fine in all browsers (though for some you have first to allow popups). I
would really avoid window.open unless especially as for this scenario it doesn't seems to bring any particular benefit but just make things harder than needed.
Feb 27, 2017 01:33 PM|SANJISH KUMAR|LINK
Actually its an intranet application he wants to develop for his company with various branches . Internet Explorer / Chrome are the default browsers
Feb 27, 2017 02:00 PM|PatriceSc|LINK
And which version? An old version might behave differently. It seems to work here with both IE 11 and Chrome 56 (I had to enable popups but once done, it worked without showing the toolbars). It doesn't even work in IE 11 ?
Try first with window.open("https://www.asp.net/","test","width=50,height=50,toolbar=0"); and move from that if it works (could it be a problme in buolding
the feature string from the screen width/height?)
Also I still fail to see which benefit it brings. How is it better to not shown any chrome while I assume it will once logged ???? It seems quite gratuitous for now and I always try to do things for a reason especailly if it make things harder than needed
which will be likely the case here even if you start to make this work (I anticipate other issues when trying to close the default browser window).
Ah, with the more complete string, I see that the location is still shown which is likely a safety measure (especially as this is called from a non user initiated event, sometimes the behavior is slightly different).
I would really start simple (I expect the window.open self trick ot not work with Chrome). I would really start with the simplest stuff I can to spot where it starts to fails.
Feb 28, 2017 03:14 AM|SANJISH KUMAR|LINK
Your solution did work except that the address bar also shows. Is it possible to have only the title bar visible and can we customize the title bar as well ?
Feb 28, 2017 07:15 AM|Eric Du|LINK
to open a new tab, official document define it only show URL Address. if you want to show title bar, please use _self, it will open a new tab with title bar.
I think if you want to use new page to log in, I think jQuery popup is a better choice for this function.