Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

div hidding and displaying

 
Pablo M�ller
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a table that has one cell inside each row. In this cell I have two divs, one has only text and the other has a text field. When the page is loaded, the only thing showing is the first one (the other is hidden with visibility:"hidden" . When it's clicked, it has to hide and show the div with the text field. When this text field looses focus has to hide and show the other one again.
I made this work on firefox like this:



On Internet Explorer doesn't work the same way (of course ), the divs hide and show, but the hidden one leaves a blank space on the screen, it doesn't "disappear" like on firefox. Is there any workaround for this?
Thanks a lot,
Pablo
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use display instead of visibility

...style.display="block"; // show
and
...style.display="none"; //hide

Eric
 
Pablo M�ller
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Eric,
That worked ok on both browsers!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic