barski Posted November 12, 2003 Posted November 12, 2003 Can someone explain why this doesn't work. on a button I have this onmouseover="hovereffect(this)" function hovereffect(srcElement){ srcElement.bgcolor = "#ffffff" } It worked fine when I used it on tablecells but it doesn't work when I use it on a button. Quote
bungpeng Posted November 13, 2003 Posted November 13, 2003 I think the button does not have "onMouseOver" event, if you change to "onClick" event, it definitely work right? Quote
barski Posted November 13, 2003 Author Posted November 13, 2003 I added the onmouseover event to the attributes and it works because if I put in an alert box instead of bgcolor it fires. It has something to do with the color. Quote
*Gurus* Derek Stone Posted November 14, 2003 *Gurus* Posted November 14, 2003 <input type="button" onmouseover="this.style.background='red'" /> Quote Posting Guidelines
barski Posted November 14, 2003 Author Posted November 14, 2003 that did it. thanks. So the button doesn't have a bgcolor you use background instead Quote
Moderators Robby Posted November 14, 2003 Moderators Posted November 14, 2003 In Styles it's background in control attributes it's bgcolor. Quote Visit...Bassic Software
*Gurus* Derek Stone Posted November 14, 2003 *Gurus* Posted November 14, 2003 The attribute "bgcolor" is by in large a deprecated descriptor. It shouldn't be used if you are at all concerned with XHTML/CSS conformant sites. Quote Posting Guidelines
bungpeng Posted November 15, 2003 Posted November 15, 2003 The attribute "bgcolor" is by in large a deprecated descriptor. It shouldn't be used if you are at all concerned with XHTML/CSS conformant sites. What is it mean? Quote
Moderators Robby Posted November 15, 2003 Moderators Posted November 15, 2003 Most control attributes do not conform to XHTML/CSS, if it exists in Styles then go that route. Details: http://www.w3schools.com/site/site_w3c.asp Validate your pages here: http://www.w3schools.com/site/site_validate.asp Quote Visit...Bassic Software
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.