mpa...@qualtech-int.com.au wrote:[color=blue]
> I tried obj.style.backg round-image, and got the error "'image' is
> undefined".
>[/color]
Try:
obj.style.backg roundImage
hyphens are not allowed in JavaScript identifiers. As a general rule
when dealing with style attributes, drop the hyphen and capitalise the
first character of the next word.
Syntax is: obj.style.backg roundImage
No dash -- uppercase I.
The dash was interpretted as a minus sign -- Subtract the variable
"image" -- and you get "image" is undefined.
....Jim Lee, Dallas, TX...
<mpayne@qualtec h-int.com.au> wrote in message
news:1115620847 .035095.312680@ g14g2000cwa.goo glegroups.com.. .[color=blue]
> I tried obj.style.backg round-image, and got the error "'image' is
> undefined".
>
> Thanks
> Martin
>[/color]
RobG wrote:
[color=blue]
> Try:
>
> obj.style.backg roundImage
>
>
> hyphens are not allowed in JavaScript identifiers. [...][/color]
That is not entirely true. The hyphen is in fact a minus which acts as
an operator in JS, and operator whitespace is optional. That is why it
cannot be part of an identifier.
Comment