PDA

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



vikasbhagwagar
08-25-2006, 11:47 AM
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...

mburt
08-25-2006, 05:15 PM
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?

mburt
08-25-2006, 05:16 PM
zIndex has nothing to do with the object being hidden or visible. It has to do with the z-axis position.

vikasbhagwagar
08-25-2006, 06:30 PM
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 ????