Question : how use javascript to expand and close div tags in asp.net page

this is what i have:    

...
function toggleMe(a){
  var e=document.getElementById(a);
  if(!e)return true;
  if(e.style.display=="none"){
    e.style.display="block"
  } else {
    e.style.display="none"
  }
  return true;
}

...

   
     
       
       
       
     
   

       
       

Discipline SIM Performance


   

   

   

   
     
       
       
       
     
   

   


the expanding and contracting works, but the subsequent page reload reset everything back to the original state.  i suspect this is either a simple solution or something complicated that requires 3rd party tool.  thanks.

Answer : how use javascript to expand and close div tags in asp.net page

if you r using master pages try that
document.getElementById('<%=btnId.ClientID%>')
Random Solutions  
 
programming4us programming4us