angelodev Posted May 6, 2007 Share Posted May 6, 2007 hi there, i have a piece of code that look like this: <td style= "something.... " onMouseOver = "changestyle" onMouseOut = "changestyle"> Right now, i have to change the style of the page adding a CSS files, just for make clear the page code. Is there a solution for insert into the CSS also the two style changed by the onMouseOver/out events? And how can i recall from the TML page? Quote Link to comment Share on other sites More sharing options...
fenway Posted May 6, 2007 Share Posted May 6, 2007 You mean like by changing the class? Quote Link to comment Share on other sites More sharing options...
angelodev Posted May 7, 2007 Author Share Posted May 7, 2007 Yes, it could be... if I change the class the page will be update dinamically or i 'll have to refresh? Quote Link to comment Share on other sites More sharing options...
igor berger Posted May 7, 2007 Share Posted May 7, 2007 Usually you use JavaScript to change an image with object method, but you can always use DOM! Or are you try to change the color of text? Use CSS! Quote Link to comment Share on other sites More sharing options...
angelodev Posted May 7, 2007 Author Share Posted May 7, 2007 I ave to change te cells background color where the mouse come over. For make more clear the code , i'd like to use CSS. If I change the class dinamically with Javascritp, the background will change or i have to refresh thw browser? Quote Link to comment Share on other sites More sharing options...
obsidian Posted May 7, 2007 Share Posted May 7, 2007 I ave to change te cells background color where the mouse come over. For make more clear the code , i'd like to use CSS. If I change the class dinamically with Javascritp, the background will change or i have to refresh thw browser? As fenway suggests, simply changing your class will let you do what you're after. If you generate a class in your CSS something like "td.hover", you could just apply it like so: <td onmouseover="this.className='hover';" onmouseout="this.className='';"></td> Quote Link to comment Share on other sites More sharing options...
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.