Link to home
Create AccountLog in
Avatar of Camillia
CamilliaFlag for United States of America

asked on

Simple question: hide a gridview BUT in javascript

I have 2 gridviews, on body onload, I want to hide one of them...

so <body onLoad="how Do I hide the gridview2 here"/>

dont want to use asp.net's visible...
Avatar of TName
TName

To hide any element with js, you can do this (give the element an id!):

<body onload=hide()>    

function hide(){ document.getElementById('someId').style.display='none';  }

or

function hide(){ document.getElementById('someId').style.visibility='hidden';  }


ASKER CERTIFIED SOLUTION
Avatar of TName
TName

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer