![]() |
| ||
| Javascript event & color change problem hi all I'm having an odd problem with Javascript. I created a table with a single row and a single column (and gave all of them IDs). Then I use onclick events to pick up mouseclicks and call the function clicked(evt). I know this function is getting called, and I know this function picks up exactly which source element was clicked. I'm trying to write it so that if the user clicks within the box, the color of the box changes. I'm having a problem with this. I've tried several slight variations of the code, but nothing seems to work. Any help would be much appreciated. Quote:
|
| ||
| Re: Javascript event & color change problem This worked for me <html> |
| ||
| Re: Javascript event & color change problem Thanks very much peter_budo. Any idea why my code wouldn't work? |
| ||
| Re: Javascript event & color change problem You used comands for DOM which you did not declared. document.style.backgroundColor=green; |
| All times are GMT -4. The time now is 9:10 am. |
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC