Need to curb to click close button in browser

Posted by Mokkarasu under JavaScript on 3/20/2014 | Points: 10 | Views : 532 | Status : [Member] | Replies : 1
Hi frnds,

Is it possible to hide the close button in browser or any possiblities to curb user to click the close button in browser using javascript.I tried onbeforeonload event in javascript but not able to get what am exactly needed. Can any one suggest a solution. thanks in advance.




Responses

Posted by: Durgammahesh22 on: 3/20/2014 [Member] Starter | Points: 25

Up
0
Down
Hi,

I don't think, you are not allowed to disable the close button in the browser for security reasons.

But, you can open the window in fullscreen size which means the browser automatically will hide the titlebar and the minimize, maximize, and close buttons!

To open a webform in fullscreen see below:

window.open('WebForm2.aspx', '', 'Fullscreen=yes');

Thanks,
Mahesh

Thanks,
Mahesh

Mokkarasu, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response