javascript - Cant get server control's id using document.getElementById() -


i trying pass asp panel id button onclientclick method , intend show panel document.getelementbyid fetching null value. why not able fetch control's id.

here's mark up:

<asp:panel id="pnl1stdurationwaiverform" style="display: none" runat="server"></asp:panel> <asp:linkbutton id="lbtnyes" runat="server" onclientclick="showdurationwaiver(document.getelementbyid('<%= pnl1stdurationwaiverform.clientid %>'))" text="yes"></asp:linkbutton> 

here's javascript method:

function showdurationwaiver(pnlctrl) {  debugger;  if (pnlctrl != null) {     pnlctrl.style.display = 'block';  }  return false; } 


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -