I’m looking for an alternative to window.prompt(), window.confirm() and window.alert(). It’s required for a complex web application where the window has an onblur() method and both IE and Safari incorrectly trigger this blur when raising a prompt (actually Safari crashes and IE ignores the prompt because the user hasn’t allowed “scripted windows”). I can disable the window.blur temporarily but the IE issue is more serious and there’s no simple fix.
I know it can be done, I’m just hoping someone may have a nice “out of the box” solution (the lighter the better) that I can use as a simple drop-in replacement. I’d prefer pure JS to something with yahoo/jquery dependencies but I’ll take what I can get.
I’d really like a solution that pauses script execution (like creating an endless loop) but if I have to use callbacks I will. It isn’t necessary to be draggable.
Thanks for the responses. Since it looks like most of the answers are going to require a framework I wrote my own solution. It’s extremely lightweight and simple and requires no dependencies I don’t already have. It’s just not as generic or reusable as the framework UI versions.
HTML
CSS