Jump to content

how to change the colors of the ALERT BOX


sudhakarReddy

Recommended Posts

hi guys,Is it possible to change the colors of the alert box in Javascript. If it is possible how? just we r using alert("hello world");. Please tell me ByeSudhakar

No it is not possible, this is handled by the operating system not the browser.You could maybe try creating a div with the highest z-index and trick people into thinking it's an alert... :)
Link to comment
Share on other sites

Yeah, good alternative :)There may be the "modeless-" or "modaldialogbox" for an alternative, one of those two, I çan't remember which one, does not allow to focus back on the parent window, thus some like the real alert :)The <something>dialogbox is editable, you may customise it to your preference. There is only one thing, in IE6+ there will be a forced statusbar at the bottom of the dialog, even if you open one without it. The reason is because of the popup blocker that was buildt in IE6. :blink: However, it would be a great challenge to recreate an alert by using either these methods :)But for only coloring the text, that is not possible. I do have read about some styling measures for the alert, but can't remember where or even what they were, sorry :blink:

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...