SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    Non-Member
    Join Date
    Mar 2004
    Location
    Croatia
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    get element by id problem

    hi!
    i have a script which get document coordinate for a layer:
    Code:
    function timedUpdate() {
      setTimeout("timedUpdate()", 250);
      var c = document.coordinate;
      c.Top.value = select.top();
      c.Left.value = select.left();
      c.Width.value = select.width();
      c.Height.value = select.height();
    }
    and i need to change this line:
    Code:
    var c = document.coordinate;
    which gets coordinate from all document to this:
    Code:
    var c = document.getElementById('cont').coordinate;
    which get the coordinate from the layer in which the second layer is!
    the container layer id is cont!
    but it wont work!!!
    can someone helps me about this line!
    regards

  2. #2
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hyperimage,

    Again, it would really help us to help you if we could see the complete source code for the page in question.

    *** Why did you create another SPF user-name?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •