P.Brian.Mackey
P.Brian.Mackey

Reputation: 44285

Javascript - Disable URL in alert

On the iPad my alert('hi') pops up with a URL in the title zone. Can I turn this URL off? I do not want to see it. I am considering using some jQuery plugin as a workaround, but it sure would be nice to just fix it.

Upvotes: 0

Views: 2650

Answers (2)

MichaelSmith
MichaelSmith

Reputation: 719

I don't think that can be turned off, alerts are defined in the browser itself. You can redefine alert (window.alert = jqueryAlertPLugin.alert) and not have to worry about your code calling the native one. I recommend the jAlert plugin. You will lose the blocking functionality of the native alert, but I bet that isn't usually an issue for most people.

Upvotes: 2

user622367
user622367

Reputation:

You can't change the title of a javascript alert box, for user security reasons. You could use an alternative such as a pop-up <div>.

Upvotes: 1

Related Questions