Not sure if I've got the JS wrong or the .net code wrong but....
I have an asp button and I added the property onclientclick, I'm trying to set a DIV to visible when the button is clicked. The page refreshes but the DIV is still hidden any ideas?
<script type="text/javascript">
<!--
function toggle_visibility(id) {
var e = document.getElementById(id);
//if(e.style.display == 'none')
e.style.display = 'block';
//else
//e.style.display = 'none';
}
//-->
</script>
<asp:Button ID="AddMe" runat="server" Text="Add" OnClientClick="toggle_visibility('NewAbs')" />
<div id="NewAbs" style="visibility: hidden"> <table cellpadding="4" cellspacing="4" border="1">
some stuff in here
</table>
</div>
function toggle_visibility(id) {
alert("Hello");
}
if that works, there is another problem