Forum Moderators: not2easy

Message Too Old, No Replies

Problem in IE with form fields in DIV

Problem in IE with form fields in DIV

         

diegobenedicto

5:16 pm on Jan 26, 2006 (gmt 0)

10+ Year Member



Hi all,
I have a problem in Internet Explorer only with form fields inside a div.

In some html input fields (text and checkbox) I cannot access with the mouse with click, only can access with TAB key, very strange.

The div is:

<div id="censos" style="visibility:hidden; position:absolute;background-color:white;left:10px;top:90px;width:790px;">
<%@ include file="censo.jsp" %>
</div>

and in censo.jsp I have the html fields, for example:
<input type=text name="campo1"/>

Please help me, best regards!
Diego

Fotiman

5:44 pm on Jan 26, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Well, you have visibility hidden so that would mean you couldn't see the input at all... I'm assuming you reset the visibility in some other code.

However, I had a similar problem once and it ended up being that my absolutely positioned item was being covered up by the margin of another item on the page. The solution was to give the absolutely positioned item a higher z-index to make sure it was "on top" of the margin. Try adding:

z-index: 500;

and see if that fixes it.

diegobenedicto

8:08 am on Jan 27, 2006 (gmt 0)

10+ Year Member



Hi,
Yes, I put it to visible with JavaScript ;)

I have tried putting z-index and it doesn't work in I. Explorer...

I have solved the problem putting several times to visible the div, with

document.getElementById(id).style[property] = value;

Thanks,
Diego