• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

div hidding and displaying

 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Eric,
That worked ok on both browsers!
 
These are not the droids you are looking for. Perhaps I can interest you in a tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic