Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

open new page in model popup with jquery

Any one have idea how to open a new page in model popup using jQuery. New page should be Aspx page. I do not want use ajax extender.

like image 717
jenifer Avatar asked Oct 24 '22 01:10

jenifer


1 Answers

You could use a jQuery UI Dialog.

$('#dialog').load('/path/to/aspx', function() {
    $(this).dialog({
        modal: true,
        height: 200
    });
});

This will load the page at /path/to/aspx in a div with id dialog and then present the contents of the div in a modal window.

Include the following in your html

<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>

See the linked documentation for more information.

like image 136
Sahil Muthoo Avatar answered Oct 27 '22 09:10

Sahil Muthoo