Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: Client Scripting
Expertise: Beginner
Oct 22, 1999



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Cannot Align Prompts and Alerts

I have alerts and prompts intermingled on a page that collects information from the user. Is there a way to align them all so that they do not appear at the top right (prompt) and center (alert), but all appear at the same point on the screen?

While the prompt(), alert(), and confirm() methods make interacting with the user easy, they provide no way for you to control anything about what the user sees. The look of the dialog—its title bar, the labels on the buttons, colors, and so on—are all up to the browser and the user's operating system. You have no way to change any of these attributes. Your only other alternative is to open a whole new browser window using the window.open() method. Of course, this requires considerably more effort to work well for simple dialogs and is probably more trouble than it's worth.

DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date