Click to See Complete Forum and Search --> : visible


chicken.king
10-07-2005, 04:23 AM
hello can anyone tell me why this code contain error ? default i set it to visible to false but after lost focus i want to make it visible to true but error occur

<Script language = "Javascript">
function new1()
{
document.getElementById("text1").style.visibility= 'visible';
}
</script>

<body>
<asp:TextBox ID="text1" CssClass="input" Columns="20" Runat="server" onblur="new1()" visible = false></asp:TextBox>
</body>

any help will be appreciate.

bathurst_guy
10-07-2005, 05:12 AM
document.getElementById("text1").style.visibility= '';

chicken.king
10-07-2005, 05:26 AM
sorry still cannot

Orc Scorcher
10-07-2005, 07:42 AM
Maybe it's because the 'visible' property of an ASP.NET control and the CSS 'visibility' property haven't much in common except a similar name?

tabzter
10-07-2005, 09:32 AM
try: document.getElementById("text1").style.display= 'none'; // to hide
and document.getElementById("text1").style.display= 'inline'; // to show