Click to See Complete Forum and Search --> : Copy STYLE question


KGUI
07-29-2003, 07:18 AM
Hi,

I want to do something like this;

var prevStyle = object.style

Where 'object' is an INPUT field
later on ....

object.style = prevStyle ;

I now get a message that I want to change something (probably an object in .STYLE) which can not be changed.

Why ? And how to perform a COPY functions like this.

Pieter

Khalid Ali
07-29-2003, 08:48 AM
are you trying to do something like this

prevStyle = obj.style.property

later

obj.style.property = prevStyle;

or you can change the class name of an element at runtime as well

KGUI
07-29-2003, 12:10 PM
Yes, I could copy a Property.
But if you don't know which property will be changed (using CSS definitions), it's difficult to name that property.

So I thought I copy the whole .STYLE but that seems to be a one way ticket.

Pieter