Guest macdavido Posted June 7, 2006 Share Posted June 7, 2006 Hello,please help me with my small problem. I don''t understand why it doesn't work.There is a table with some cells:<TABLE BORDER="0" WIDTH="180" HEIGHT="150" CELLSPACING="0" CELLPADDING="0" CLASS="poland small10pt" BACKGROUND="images/bckgr_offercart.gif" ONMOUSEOVER="this.background='images/bckgr_offercartOVER.gif" ONMOUSEOUT="this.background='images/bckgr_offercart.gif'"> <TR><TD>AA</TD></TR> <TR><TD>BB</TD></TR> <TR><TD>CC</TD></TR> <TR><TD> </TD></TR></TABLE>In first line I trying with events mouseover and mouseout. There is no effect. And I don't know why ;-( please help. I have just change a background when mouse is over the table and when I get it out.RegardsMacDavidoMacOS X Tiger @ G5-Dual... "there is not like m$-not response" Link to comment Share on other sites More sharing options...
pulpfiction Posted June 7, 2006 Share Posted June 7, 2006 I guess that because you are missing a single quote in the MOUSEOVER event<TABLE BORDER="0" WIDTH="180" HEIGHT="150" CELLSPACING="0" CELLPADDING="0" CLASS="poland small10pt" BACKGROUND="images/bckgr_offercart.gif" ONMOUSEOVER="this.background='images/bckgr_offercartOVER.gif'" ONMOUSEOUT="this.background='images/bckgr_offercart.gif'"><TR><TD>AA</TD></TR><TR><TD>BB</TD></TR><TR><TD>CC</TD></TR><TR><TD> </TD></TR></TABLE> Link to comment Share on other sites More sharing options...
Little Goat Posted June 7, 2006 Share Posted June 7, 2006 it needs to be this.style.background='yourimage.gif' Link to comment Share on other sites More sharing options...
scott100 Posted June 7, 2006 Share Posted June 7, 2006 it needs to be this.style.background='yourimage.gif'<{POST_SNAPBACK}> That's incorrect Little Goatthis.style.background should be used for colors ie this.style.background="red"This is correct.this.background='images/bckgr_offercartOVER.gif'If you were to use style like your code sugests then you would have to include this:this.style.backgroundImage='url(images/bckgr_offercartOVER.gif)'that is the proper code to include a background image dynamically using css route. Link to comment Share on other sites More sharing options...
aspnetguy Posted June 7, 2006 Share Posted June 7, 2006 That's incorrect Little Goatthis.style.background should be used for colors ie this.style.background="red"This is correct.this.background='images/bckgr_offercartOVER.gif'If you were to use style like your code sugests then you would have to include this:this.style.backgroundImage='url(images/bckgr_offercartOVER.gif)'that is the proper code to include a background image dynamically using css route.<{POST_SNAPBACK}> it could also be this.style.background='url(yourimage.gif)' but this.background is valid as well since you can use hte background attribute in a <td>...it is just depreciated for XHTML. Link to comment Share on other sites More sharing options...
Little Goat Posted June 7, 2006 Share Posted June 7, 2006 ok, sorry.BTW, aspnetguy, it's not depreciated, it's deprecated Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now