ramalaks
08-05-2011, 10:11 PM
I have a Input text field and onClick on that, I open a div right below. position:absolute and have I have width and height set to 300px and overflow:auto. I have 4 div in the same page on 4 diff. input fields work they has behave the same way
now, I have set the height of the DIV based on the available space below the input field? The idea is to find the document height and subtrace div's position top, then I will know the Height available to set for DIV. But posTop is coming back as 0.
second quesiton is to place the DIV itself below the input field or above the input field based on the window/document size. That is if there is not enough space under a input field, to display DIV, then the DIV should appear above the input field. How to do that?
now, I have set the height of the DIV based on the available space below the input field? The idea is to find the document height and subtrace div's position top, then I will know the Height available to set for DIV. But posTop is coming back as 0.
second quesiton is to place the DIV itself below the input field or above the input field based on the window/document size. That is if there is not enough space under a input field, to display DIV, then the DIV should appear above the input field. How to do that?