I am making a form which will take inputs such as email, password etc.

And the form checks whether it is a valid email id or password, if not an alert is being shown such as invalid email-id..

I have done this with java script..

Now I would like to change the font colour and background colour of the alert box..

How can I use Java script to do this.. Please help with code..

Recommended Answers

All 3 Replies

Member Avatar for GreenDay2001

No you cant change the font/bg colour of alert box.

thanks for your reply Vishsesh, but I've heard its possible both in netscape and internet explorer.

You can't. It's implementation defined. Each browser has it's own way of showing the alert box though the presence of 'external skins' installed for that browser may change the appearance of the alert box but other than that, you have no control whatsoever.

Your best bet would be to use a Javascript library like YUI which pops up a programmable and skinnable "div" giving you the impression of a custom alert box.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.