ASP.NET - Modal pop up extender - Asked By Haritha Jadcherla on 20-May-13 03:45 PM

I do have a modal pop up extender , I have javascript functionality to call , but not sure how to implement the functionality in javascript here is my code
when i click on this button teh pop up should show.
<script type="text/javascript" language="javascript">
 function Showpopup() {
            // var pop = document.getElementById("modalpopup");                       
             bool info= this.document.getElementById('pnlissues').hasChildNodes();
             if(info == true)
             setTimeout(HidePopup, 5000);
          }
          function HidePopup() {
              window.close();
          }
</script>
 <asp:Button ID="btnReportissues" runat="server" Text="Report New Issues to OHCMD" 
            onclick="btnReportissues_Click"  OnClientClick="Showpopup(); return true;" />
 <fieldset class="fieldset">
    <asp:Panel ID ="pnlissues"  runat="server" ScrollBars="None">
       <div class="PopupHeader" id="PopupHeader">Issues Reported</div>
      <div class="tblRow" style="height:12px">
      <div class="tblText13pct"><asp:Label ID="lblDate" runat="server" Text="Reported Date" CssClass= "LabelText" Font-Bold="true" Width="100px" /></div>
      <div class="tblText13pct"><asp:Label ID="LabelDate" runat="server" CssClass="LabelText" /></div>   
      </div>
      <div class="tblRow" style="height:12px">
      <div class="tblText13pct"><asp:Label ID="lblReportedby" runat="server" Text="Reported By"  CssClass="LabelText" Width="100px" /></div>
      <div class="tblText13pct"><asp:Label ID="LabelReportedby" runat="server" CssClass="LabelText" Width="100px" /></div>
     </div>
     <div class="tblRow" style="height:12px">
      <div class="tblText13pct"><asp:Label ID="lblIssuetype" runat="server" Text="Issue Type" CssClass= "LabelText"  Width="100px" /></div>
      <div class="tblText13pct"><asp:DropDownList ID="ddlissuetype" runat="server" ></asp:DropDownList></div>   
      </div>
      <div class="tblRow" style="height:12px">
      <div class="tblText13pct"><asp:Label ID="lblissueDescription" runat="server" Text="Issue Description" CssClass="LabelText" Width="100px" /></div>
      <div class="tblText13pct"><asp:TextBox ID="txtdescription" runat="server"  Text='<%# Eval("DESCRIPTION") %>' TextMode="MultiLine"></asp:TextBox>  </div>
     </div>     
     <asp:Button ID="submitbutton" runat="server" Text="Submit" 
            onclick="submitbutton_Click"  OnClientClick="$find('modalpopup').hide(); return false;"/>
     <asp:Button ID="CancelButton" runat="server" Text="Cancel"  OnClientClick="$find('modalpopup').hide(); return false;"/> 
     </asp:Panel>    
    </fieldset>
  <cc1:ModalPopupExtender ID="mpe" runat="server" TargetControlId="btnReportissues" 
 PopupControlID="pnlissues" OkControlID="submitbutton" 
 CancelControlID="CancelButton"  OnCancelScript="Window.Close();"
 X="200" Y="200" 
   BackgroundCssClass="ModalPopupBG" Drag="false" BehaviorID="modalpopup"
    PopupDragHandleControlID="PopupHeader" ></cc1:ModalPopupExtender>
please help me out


Jitendra Faye replied to Haritha Jadcherla on 22-May-13 09:42 AM
Use Jquery popup.

Follow my article-

http://steptodotnet.blogspot.in/2011/12/jquery-popup-window-in-aspnet.html
Haritha Jadcherla replied to Jitendra Faye on 22-May-13 06:32 PM
Thank you Jitendra will try this.
Harish Mady replied to Haritha Jadcherla on 23-May-13 10:31 AM
The modal popup extender will have a property called BehaviorID. U can find the behaviorID of the popup in javascript like var popupid = $find('behaviorID');
Then u can show and hide like this
popupid.show() and popupid.hide();
Hope this helps u out.
Haritha Jadcherla replied to Harish Mady on 23-May-13 11:46 AM
Hi Harish,

I even tried this '$find('behaviorID'); ', but the value is null since $find was not able to recognize the behaviourID, so I tried in a different manner. 

Thanks,
Haritha