Link to home
Start Free TrialLog in
Avatar of dshrenik
dshrenikFlag for United States of America

asked on

Change the visibility of an HTML textbox.

I am able to hide a textbox by doing:
var tb1 = document.getElementById(id);
tb1.style.display = "none";

However, I am not able to make it visible by doing this:
tb1.style.display = "";

Please let me know what I could be missing. Thanks!
Avatar of leakim971
leakim971
Flag of Guadeloupe image

use : tb1.style.display = "block";
Avatar of dshrenik

ASKER

Still does not work. :(
ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
<< the textbox DON'T EXIST in the page so you CAN'T ask javascript to show it >>
I am actually creating an HTML textbox through JavaScript.
I think the textbox is inside  a <td>, and I have set:
<td style="display: none">

Phew!