locked
Modal Pop Up Extender RRS feed

  • Question

  • User1337950811 posted

    Hi All,

    I am new to Ajax control tool kit. Please find my issue below.

    I am using Modal Popup Extender to open a new url where I will edit the existing details. After I close the Pop Up window and reopen next time the modal pop up extender opening with the old values. The child page is not getting loaded.

    This issue is occuring in IE8 But in IE9 this is working fine.

    Can anyone please help me out to resolve this.

                var frame = $get('IframeEdit');            

    frame.src = url;           this URL is loading the child page in IE 9 but not in IE 8

    //document.getElementById("IframeEdit").src = url;           

     $find('EditModalPopUp1').show();

     

     

    Wednesday, June 18, 2014 3:19 AM

All replies

  • User724169276 posted

    ModalPopupExtender is also a part of your page class.so ultimately you have to do a complete refresh or postback.Instead of this use Iframes.

    Wednesday, June 18, 2014 3:32 AM
  • User1337950811 posted

    Hi I have used Iframes. Please find the code below,


    <ItemTemplate>                                                       <table width="100%">

    <tr>

    <td align="left">

                                                                             

    <asp:Button ID="btnUpdate" Width="55px"  runat="server" Text="Modify" Visible='<%# isButtonVisible(Convert.ToString(Eval("Accessarea")),Convert.ToString(Eval("Newaccessarea"))) %>' OnClientClick='<%# Eval("ID","Javascript:openwindow(\"UpdateAssetDetails.aspx?ID={0}\")") %>'/>                                                                        

    <asp:ModalPopupExtender ID="modalPopUpUpdateAsset1" runat="server" BackgroundCssClass="ModalPopupBG"  TargetControlID="btnUpdate"  PopupControlID="DivEditWindow" CancelControlID="btnClose" OnCancelScript="calcelScript()">

                                                                   </asp:ModalPopupExtender>

                                                                              <div id="DivCancel" style="display:none">

                                                                     <input type="button" id="btnClose" />

                                                                     </div>

                                                                               <div id="DivEditWindow" style="display: none; overflow:hidden" class="popupConfirmation">

                                                                                     <iframe id="IframeEdit" frameborder="0" scrolling="no" height="400px" width="500px">

                                                                                       </iframe>

                                                                               </div>

                                                                           </td>

                                                                           </tr>

                                                                           <tr>

                                                                           <td align="left">

                                                                              <asp:Button ID="lnkAddDetails" runat="server" Width="55px" Text="Add" OnClientClick='<%# Eval("ID","Javascript:openwindow(\"AddAssetDetails.aspx?ID={0}\");return false;")%>'/>

                                                                               <asp:ModalPopupExtender ID="modalPopUPAddAsset" runat="server" BackgroundCssClass="ModalPopupBG" TargetControlID="lnkAddDetails" PopupControlID="DivEditWindow" CancelControlID="btnClose" OnCancelScript="calcelScript()"></asp:ModalPopupExtender>                                                                  

    </td>                                                                  

    </tr>                                                          

    </table>

    </ItemTemplate>

    Java Script Code :

           

    function openwindow(url) { 

    var frame = $get('IframeEdit');

     frame.src = url;       

    $find('ModalPopUp').show();

            }

           function calcelScript() {

                window.location.reload();

            }

    Please assit me this. I think I am reloading the page. Can you please advise me whether i need to reload the child page after the close button in child window. even that i am reloading.

    Wednesday, June 18, 2014 3:52 AM
  • User724169276 posted

    Use panels instead of divs.Morover instead of jquery show and hide use server side show and hide methods on button click.This will ensure proper page refresh.

    Wednesday, June 18, 2014 3:56 AM
  • User1337950811 posted

    frame.src = url; should load the child page. this works good in IE 9 but the value gets loaded in the db. When i click the same button in grid again the modal pop up is opening with the old values.

    Wednesday, June 18, 2014 3:57 AM
  • User555306248 posted

    Hi,

    You can use normal popup or AJAX modal popup with a frame in it.

    To use AJAX modal popup with a frame in it,please check out the following link for more information: http://forums.asp.net/p/1160057/1919992.aspx#1919992

    you can try jQuery Dialog. For more information, please refer to the following link:

    http://jqueryui.com/demos/dialog/

    http://deseloper.org/read/2008/04/a-simple-modal/

    http://dev.iceburg.net/jquery/jqModal/

    Thursday, June 19, 2014 12:14 AM