How to make a javascript alert NOT say the name of the page?
Asked Answered
B

3

3

My webapp alert looks like this:


InputCoordinates.html

Latitude must be filled out.


I would say this looks unprofessional and rough around the edges. Is there a way to stop the alert from displaying the pagename?

Backandforth answered 22/3, 2012 at 15:0 Comment(3)
Unfortunately, no, not with the default javascript alert. You'll need to create a custom alert box of your own.Chamber
show some code ! Have you considered modal popups instead of alert's ?Ley
Haha the code is just "alert("So and so");", so I didn't bother. I am unfamiliar with modal popups, I'll have to look into that.Backandforth
L
3

You can't manipulate that.
Maybe you take a look at these bastards called modal popups, if youre able to use jQuery.

There are non-jquery options, too, of course.

Ley answered 22/3, 2012 at 15:5 Comment(0)
C
2

Use an HTML modal box instead of the JavaScript alert() Box.

There are plenty of options to choose from on the web, e.g. here.

Chrotoem answered 22/3, 2012 at 15:3 Comment(0)
C
2

I'd advise you not to use "alert". Use something that allows you to style it yourself, e.g., jQuery Dialog. You can make that modal if necessary (follow the links on the right of the page I sent for add'l examples).

Confiscatory answered 22/3, 2012 at 15:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.