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.