First poster here, but I wanted to know if there was anyway that it was possible to customize the JavaScript prompt boxes without using jQuery? I'm wanting to keep my site vanilla as possible. Thanks.
Asked
Active
Viewed 297 times
-1
-
Could you specify that a bit, please? – Xiphias Jan 29 '14 at 19:25
-
I'm wanting to customize the 'prompt();' boxes in JS. I was wanting to know if this was possible without jQuery. – pyrogoggles Jan 29 '14 at 19:27
-
If you want to customize, then you can't really use `prompt()` and need to build your own solution. – Brian Glaz Jan 29 '14 at 19:28
-
Thanks for letting me know. Would you happen to know if there's a way that I could make any sort of custom prompts? – pyrogoggles Jan 29 '14 at 19:30
2 Answers
1
You can create your own modal dialog boxes. However you cannot customize how, for example, window.alert("Hello!")
would look. That is completely up to the browser manufacturer.

atdrago
- 295
- 4
- 16
-
Thanks for the info on that. Would you happen to have some resources for this, or anything demonstrating it? Thanks. – pyrogoggles Jan 29 '14 at 19:29
-
There are a few other posts on SO about it. [This one](http://stackoverflow.com/questions/17627468/customizing-javascript-confirmation-dialog-boxes) has links to other posts, so I'll reference it. Also, just experience. I've been demanded to customize the alert/prompt/confirm dialog boxes by clients and have always ended up creating my own modals because it simply isn't possible. – atdrago Jan 29 '14 at 19:34
-
All right, thanks so much for the help. You were the most helpful answer, marking now. Thanks again! – pyrogoggles Jan 29 '14 at 19:35
-