how to hide a text box when a button is clicked
Moderator: General Moderators
how to hide a text box when a button is clicked
i have a text box and a button in a form. when i click on the button is it possible to hide the textbox? the textbox should not appear on the screen after the button is clicked
Re: how to hide a text box when a button is clicked
use javascript.chitrapu wrote:i have a text box and a button in a form. when i click on the button is it possible to hide the textbox? the textbox should not appear on the screen after the button is clicked
put the textbox in a div and do somthing like:
Code: Select all
function hideTextbox(div) {
var textbox = document.getElementById['div'];
textbox.style.visibility = 'hidden'; //hides text box
}Im no Javascript pro, but i think thats how its done.
Last edited by wildwobby on Thu Feb 01, 2007 10:00 pm, edited 1 time in total.
Code: Select all
document.getElementById('whatever').style.display = "none";- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
Re: how to hide a text box when a button is clicked
thank a lot its working , but i have the same problem with a buttonalso . that code does is not working for a button.
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm