I'm interested in using a JavaScript Prompt to have the user enter data. Any concerns on using JS prompt? Will any browsers freak out?
views:
96answers:
2
+5
A:
I personally advise against it. The appearance of the window is up to the browser and out of your control. In some browsers, the dialog will be modal to the point that the user will not be able to switch to another tab without addressing the prompt
I personally recommend jQuery UI - the widgets are customizable, and prompts will not spawn another window
Matt
2010-04-11 22:14:28
I would rather save 70kb of JS and sacrifice the user's tabs. Anyways, JS prompts are aimed to do 'ok, yes, no, cancel' operations. Loading UI is kind of an overkill.Now, if OP is already using UI in his project then what the hell, use a UI dialog.
Ben
2010-04-11 22:19:37
Actually in this case, `prompt` is for asking the user to input text. IMO this should never be done in a separate window. jQuery UI or not, this should be done within the document itself.
Matt
2010-04-11 22:23:00
Agree, got myself confused with 'confirm', nevertheless I've used modal jqueryUI dialogs to work with user inputs and ajax and I've no complains, yet.@OP I really haven't seen any site that uses prompt, apart from college applications, since the late 90s and early 00s (or whatever these decades are called).
Ben
2010-04-11 22:38:53
More to the point, in IE since version 7, you get no prompt dialog until the user enables a setting.
Tim Down
2010-04-11 22:48:16
+4
A:
In IE prompt will cause a security warning. It's for this reason that I don't use it
Bob
2010-04-11 22:16:14
In current versions of IE, the Prompt dialog isn't shown until the user clicks through an Information bar. Doing your own in DHTML or via ShowModalDialog is probably a better bet.
EricLaw -MSFT-
2010-04-11 22:19:45