Results 1 to 4 of 4

Thread: HELP !! So much brainstrom !! How to know if element is cliped/hide by other elements

  1. #1
    Join Date
    Aug 2006
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question HELP !! So much brainstrom !! How to know if element is cliped/hide by other elements

    See the following code...
    <div style="position:absolute;top:0px;left:0px;z-index:1000;height:200px;width:200px">
    This is overlapped area !!
    </div>
    <table style="dispaly:none;position:absolute;top:0px;left:0px">
    <form>
    <tr>
    <td>Enter your name
    </td>
    <td><input type=text size=20>
    </td>
    </tr>
    </form>
    </table>

    if i m traversing dom say

    for(i=0;i<document.forms[0].elements.length ; i++)
    {
    //document.forms[0].elements[0].style.visible

    How to know if current element is not visible due to parent element's display property is none ??

    //document.forms[0].elements[0].style.zIndex

    How to know if current element is cliped my other element's Z-Index is to large of current element but its overlaping it... ??
    }

    Very much thankful, if anyone reply...

  2. #2
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    What?

    for(i=0;i<document.forms[0].elements.length ; i++)
    {
    //document.forms[0].elements[0].style.visible

    How to know if current element is not visible due to parent element's display property is none ??

    //document.forms[0].elements[0].style.zIndex

    How to know if current element is cliped my other element's Z-Index is to large of current element but its overlaping it... ??
    }
    You have your brace after your question? Is that a comment, a question what? You can't just add statements into code, you need to put two forward slashes before it.

    //document.forms[0].elements[0].style.visible
    Is this supposed to be a comment? Why is it code? Shouldn't you write that out in a human language?
    - Mike

  3. #3
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    zIndex has nothing to do with the object being hidden or visible. It has to do with the z-axis position.
    - Mike

  4. #4
    Join Date
    Aug 2006
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lightbulb Yes

    Yes ...

    My comment itself is question....

    While traversing forms elements, how to know .... if its cliped/hide due to other elements ?

    Waiting for your reply ????

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
  •