-1

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.

2 Answers2

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
  • Good luck with those modals! :) – atdrago Jan 29 '14 at 19:36
0

create a 'div' and show that using an event.