Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Input background

Status
Not open for further replies.

alshebli

Programmer
Feb 22, 2005
10
US
Hi,

I've been trying to figure out a way to change the background color of the input in an html form using javascript. Heck i even tried to figure out how to do it in html and no luck! :S

So far this is what I've tried:

window.opener.document.forms[0].elements['Last'].style.backgroundColor='grey';

window.opener.document.forma[0].elements['Last'].bgColor='#f54343'

Any sugguestions? I need something that will work on both IE and Mozilla.

Thank you.
 
grey" is not a valid color, "gray" is. Can you post the JavaScript error you are receiving.

Adam
 
Great! That was my mistake! I can't believe its soo stupid! Thank you! :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top