get clip value

A

Andrew Poulos

I have this function to get a particular element's style value:

fGetElStyle = function(el, cssPropName) {
if (window.getComputedStyle) return
window.getComputedStyle(el,'').getPropertyValue(cssPropName.replace(/([A-Z])/g,
"-$1").toLowerCase());
else if (el.currentStyle) return el.currentStyle[cssPropName];
else return null;
};

I have this CSS
#image116 {position:absolute; left:400px; top:16px; width:32px;
height:32px; clip:rect(0px 32px 32px 0px); visibility:inherit; z-index:29;}

but when I call
var t= document.getElementById("image116")
alert( fGetElStyle(t, "clip") );

I get 'undefined' from IE 6 (if I try it with 'position' I get 'absolute').

Is there some way to get the 'clip' value in IE?

Andrew Poulos
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top