Ravi Kumar

Ravi Kumar

  • 779
  • 1.1k
  • 31.1k

Jquery popup

Mar 14 2016 2:14 AM
hi i create web application
i have created two page
in 1st form displaying  jquery popup
in that pop up displaying 2nd form
in first form using updatepanel also.
 
 check the following code
Form1.aspx
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceholder1" runat="Server">
    <link type="text/css" rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.1.min.js" ></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
$(function () {
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_endRequest(function () {
  bindClickEvent();
});
$(function () {
  bindClickEvent();
//});

function bindClickEvent()
{
           $('#lnkAddSubTask1').click(function () {
               var mydiv = $('#popupdiv');
               mydiv.dialog({
                   autoOpen: true, width: '1250', height: '650',
                   open: function (event, ui) { $(".ui-dialog-titlebar-close").hide(); },
                   modal: true,
                   buttons: {
                       Close: function () {
                           window.location.reload();
                       }
                   }
               });
               // Load the content using AJAX
               mydiv.load('AddSubTask.aspx');
               // Open the dialog
               mydiv.dialog('open');
           });
       });
      }
</script>


    <asp:UpdatePanel ID="upTenders" runat="server">
        <ContentTemplate>
 <div id="popupdiv" title="Information" style="display: none">
        </div>
<input type="button" id="lnkAddSubTask1" value="Add/Edit" /> 
        </ContentTemplate>
    </asp:UpdatePanel >
 
AddSubTask.aspx-- 2nd form
 



Answers (1)