get clip value

Discussion in 'Javascript' started by Andrew Poulos, Apr 4, 2007.

  1. 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
     
    Andrew Poulos, Apr 4, 2007
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ben
    Replies:
    2
    Views:
    2,348
    Kevin Spencer
    Sep 13, 2005
  2. romain

    Clip interface...

    romain, Aug 12, 2003, in forum: Java
    Replies:
    1
    Views:
    762
    Knute Johnson
    Aug 13, 2003
  3. Oracle3001
    Replies:
    0
    Views:
    390
    Oracle3001
    Oct 27, 2003
  4. Ralph
    Replies:
    0
    Views:
    922
    Ralph
    Jan 18, 2004
  5. Josef Garvi
    Replies:
    0
    Views:
    349
    Josef Garvi
    Apr 27, 2004
Loading...

Share This Page