|
 |
javascript thread: few little problems
Message #1 by True2ViSioN@a... on Sun, 7 Apr 2002 16:03:35 EDT
|
|
In your peace of code you are trying to assign the value "blue" of the
img tag to the backgroundColor of the object "color". I asume that
somewhere else in your html you have an object that is called "color".
I have a few remarks:
-It is not wise to name an object with a reserved word (color)
-Officially the image object does not have a value property
-The <td> does not have a value property either (see your last sentence)
So what you try to do is not possible
Regards,
Gerhard Wentink
WEBSET interactive
wentink@w...
0595-557401
06-291724429
www.webset.nl
>-----Original Message-----
>From: True2ViSioN@a... [mailto:True2ViSioN@a...]
>Sent: Monday, April 08, 2002 9:51 PM
>To: javascript
>Subject: [javascript] RE:few little problems
>
>
>ok thanks all for your help but for the table Q here it is
>beter explained
>
><td bgcolor="Blue" title="Blue"><img value="blue" width="12"
>height="12"
>onclick="color.style.backgroundColor=this.value;"></td>
>
>i use that code but i dont want to use that in every td is
>there away to put
>the onclick
>in the table and have it get that value from the td?
>
>
>---
>
>Improve your web design skills with these new books from Glasshaus.
>
>Usable Web Menus
>http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/the
programme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20
|
|
 |