document.images[0].X

Discussion in 'Javascript' started by Jean Pierre Daviau, Feb 10, 2006.

  1. Hi,

    An easy ne I guess.

    Is there a way to get the x and y position of an image in a web page using
    IExplorer?
    document.images[0].X for example


    --
    Jean Pierre Daviau
    --
    Easyphp1.8
    Apache1.3.24
    DEVC++, borland 5.5
    windows Xp
    asus p4 s533/333/133
    Intel(R) Celeron (R) CPU 2.00 GHz
    http://www.jeanpierredaviau.com
     
    Jean Pierre Daviau, Feb 10, 2006
    #1
    1. Advertising

  2. Jean Pierre Daviau

    Danny Guest

    Try with offsetLeft or offsetHeight.

    Danny
     
    Danny, Feb 11, 2006
    #2
    1. Advertising

  3. Jean Pierre Daviau, Feb 13, 2006
    #3
  4. Except

    see my post on strange TR behavior
     
    Jean Pierre Daviau, Feb 14, 2006
    #4
  5. Jean Pierre Daviau

    Evertjan. Guest

    Jean Pierre Daviau wrote on 14 feb 2006 in comp.lang.javascript:

    > Except
    >
    > see my post on strange TR behavior
    >


    PLEASE always quote on usenet.

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., Feb 14, 2006
    #5
  6. > "Danny" <> a écrit dans le message de news:
    > NDcHf.46762$...
    >>
    >> Try with offsetLeft or offsetHeight.
    >>
    >> Danny

    >


    document.body.parentElement.offsetHeight

    does the job
     
    Jean Pierre Daviau, Feb 16, 2006
    #6
  7. "Jean Pierre Daviau" <> a écrit dans le message de news:
    Ea0Jf.16440$...
    >> "Danny" <> a écrit dans le message de news:
    >> NDcHf.46762$...
    >>>
    >>> Try with offsetLeft or offsetHeight.
    >>>
    >>> Danny

    In fact

    if(document.all){
    documente = document.body.parentElement.offsetHeight
    }
    if (document.layers){
    //Netscape
    var elems = document.getElementsByTagName('*');
    documente = elems[0].offsetHeight;
    }else{//Opera
    documente = document.getElementById('tablo').offsetHeight
    }


    > does the job
    >
     
    Jean Pierre Daviau, Feb 16, 2006
    #7
    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. Guest
    Replies:
    4
    Views:
    921
    Eliyahu Goldin
    Jan 4, 2005
  2. Luis Esteban Valencia Muñoz
    Replies:
    0
    Views:
    794
    Luis Esteban Valencia Muñoz
    Jun 3, 2005
  3. wardemon

    Cache Images vs Static Images

    wardemon, Jun 14, 2007, in forum: ASP .Net
    Replies:
    3
    Views:
    676
    bruce barker
    Jun 14, 2007
  4. Keith Hughitt
    Replies:
    6
    Views:
    1,091
  5. Amir
    Replies:
    5
    Views:
    106
    Thomas 'PointedEars' Lahn
    May 29, 2004
Loading...

Share This Page