I have a content page and a user control. The usercontrol uses CollapsiblePanelExtender. I have written the following javascript function on "onmouseout" of the panel.
<script language="javascript" type="text/javascript">
function doToggle()
{
var cpe = $find("CollapsiblePanelExtender1.ClientID");
//cpe._toggle();
if (!cpe.get_Collapsed()) {
cpe._doClose();
}
}
</script>
This conent page is part of master page. When I run the code I get javascript error. cpe is always null. How to use $find for CPE for a master page scenario? I also tried document.getElementById and passed the client id, still it didn't work. Please help.