title: How to enable/disable a button on parent modal popup from child in the IFrame using javascript
body: <p>I am trying to disable/enable a button of the parent window from the child window. </p>
  
  <p>The following is a snippet from the parent page. </p>
  
  <pre><code>&lt;ajaxToolkit:ModalPopupExtender ID="mpeTest" runat="server" 
    CancelControlID="btnClose" PopupControlID="pnl1" TargetControlID="showMpe"/&gt;
  
  &lt;asp:Panel ID="pnl1" runat="server" &gt;
             &lt;ContentTemplate&gt;
                  &lt;iframe id="ContentIframe" runat="server"&gt;
                          &lt;p&gt;Your browser does not support iframes.&lt;/p&gt;
                  &lt;/iframe&gt;
              &lt;/ContentTemplate&gt;
      &lt;p class="submitButton"&gt;
          &lt;asp:Button ID="btnClose" runat="server" Text="Close" /&gt;
          &amp;nbsp;
          &lt;asp:Button ID="btnTest" runat="server" Text="EnableDisable" /&gt;
      &lt;/p&gt;
  &lt;/asp:Panel&gt;
  </code></pre>
  
  <p>In the child page that is loaded in the iframe, I have a grid view with LinkButtons. I am attempting to get one of these LinkButtons to disable/enable the btnTest from the parent window. </p>
  
  <p>I have tried many things but I can't seem to figure this out... 
  for example:</p>
  
  <pre><code>&lt;script type="text/javascript" &gt;
      $(document).ready(function() {
          jQuery('[id$="linkButtonDisable"]').click(function() {
             window.parent.opener.document.getElementById("btnTest").disabled = true;
          });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>Can anyone please help me out. I am fairly new to this</p>