I’m trying to validate text and I use an alert() to let the user know when the text isn’t valid. My only problem is that, at least with FF4 for me, the alert doesn’t do anything to block them from doing things like the back and forward buttons, so if the text isn’t valid they can still press back and it will not be validated.
Is there a way to make the alert so that nothing can be done to the browser until the alert is cleared away?
You can bind to window.onbeforeunload and make the user proceed the “correct” way until they get it right.
However, something tells me you need to fix your work-flow and not try to circumvent the user doing what they’d like (programmers always lose).