External page in jQuery dialog

Category > ASP.NET || Published on : Thursday, May 28, 2015 || Views: 5385 || External page in jQuery dialog


<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
 <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/themes/base/jquery-ui.css" type="text/css" media="all" />
    <link rel="stylesheet" href="http://static.jquery.com/ui/css/demo-docs-theme/ui.theme.css" type="text/css" media="all" />
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/jquery-ui.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $('#popoutUsers').click(function () {
                var url = this.href;
                var dialog = $('<iframe src="' + url + '" frameborder="0"></iframe>').appendTo('body');
                dialog.dialog({ modal: true, open: function (type, data) { $(this).parent().appendTo("form"); } });
                return false;
            });
        });
    
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <a id="popoutUsers" href="popup.aspx">CLICK ME</a>
    </form>
</body>
</html>