javascript - Prevent a user from exiting from firefox using js -
how can prevent user exit firefox? want user woldn`t leave page before required fields filled. happy see full example... thanks
you can't stop closing browser, or navigating away page, if that's want do. it's their browser - can't force them anything.
that said, can pop message hooking onbeforeunload
event , returning string if there still actions want them perform. browsers display string in dialog asking whether want navigate away (or close browser etc), the firefox devs have taken stance that security risk , present generic message instead. in place, user can still choose close browser or navigate away.
Comments
Post a Comment