Martin Honnen wrote:
Rick Measham wrote:
I'm looking for a way to do:
function resetBorder(theObj) {
theObj.style.border = theObj.class.border;
}
But it doesn't seem to be as simple as that :)
I'd like a cross-browser solution, but will settle for IE.
I am not sure what
theObj.class.border
is supposed to yield but I suspect you want to reset the inline style so
that any existing style sheet takes over. The right way to achieve that
is with
theObj.style.border = '';
as that clears the inline style and then the stylesheet kicks in.
Should work with IE4+, Netscape 6+, Opera 7.
That's what I'm trying to do, and it works with IE5 for Mac. However IE6 for
Win thinks that theObj.style.border='' is the same as no border. So what I
wanted to do was access the border property of the class assigned to the
object and apply said border as a style.
--
Obviously the reply-to is a fake. Just change the 'spam-' to 'i' so that the
result sounds like why you go to an optometerist.