NYCPHP Meetup

[nycphp-talk] HTML/CSS div hide/show form problem

Cliff Hirsch cliff at pinestream.com
Thu Jan 4 12:20:42 EST 2007


Ok, so this isn't PHP, but it's what drives us PHP programmers' crazy
right - "quirks" mode, browser incompatibilities, etc. It's maddening.
 
I asked my Boston PHP buddies if they can figure this one out. Let's see
who can provide an answer first: Yankees or Red Sox:
------
I have a form that can be toggled to be visible or hidden using the
following statement:
 
<div id="inviteform" style="display:none;">
   the form... 
</div>
 
The form is initially set to be hidden. A simple JavaScript function
toggles the div display property to nothing/block or none.
 
Problem:
Without this code, the cursor appears normally in the input elements
With this code, the cursor disappears in the input elements. It's
awfully annoying to type text in an input element without the visual cue
of a cursor.
 
This occurs in FireFox, but not IE.
 
Does anyone know why the cursor is disappearing? I'm guessing that the
input element cursor attribute picks up the none property (as in
cascading) when hidden, but does not revert back to visible when the div
display element is changed back to '' or block.
 
Any ideas regarding a solution?
 
Cliff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20070104/b440d947/attachment.html>


More information about the talk mailing list