1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Locking/Freezing Popups

Discussion in 'HTML & JavaScript' started by maddypikachu, Apr 19, 2016.

  1. maddypikachu

    maddypikachu Newbie

    Joined:
    Apr 18, 2016
    Messages:
    4
    Likes Received:
    0
    Hey,
    Is there any popup script which freezes browser and user cant close the tab without filling the form ?
     
  2. sachinram

    sachinram Newbie

    Joined:
    Apr 19, 2016
    Messages:
    12
    Likes Received:
    1
    No you cannot restrict the user not to close the tab as tab is in browser and your website cannot control the browser.

    However, you can go for one solution:-
    Whenever user moves the mouse up then you can show an alert javascript popup in the browser. With this you can force user to complete the form before he closes the browser.
     
  3. LockerWizPro

    LockerWizPro Jr. VIP Jr. VIP

    Joined:
    Aug 10, 2010
    Messages:
    143
    Likes Received:
    204
    This is not possible with most current browsers as when a popup comes up more than once the user is given a check box that says "Prevent this window from showing additional dialogs" or something along those lines.
     
  4. roguerabbit

    roguerabbit Regular Member

    Joined:
    May 11, 2015
    Messages:
    211
    Likes Received:
    61
    Occupation:
    Electrician by day, freelancer by night
    Location:
    Earth
    Most users are not stupid ( ok some are ) and will Alt F4 or force close as soon as they realize this ( I work on the assumption that most of your users will be using Windows )
     
  5. LockerWizPro

    LockerWizPro Jr. VIP Jr. VIP

    Joined:
    Aug 10, 2010
    Messages:
    143
    Likes Received:
    204
    Attempting to do this is unethical even for a black hat forum.