Text: A page is displayed in a div
1.<iframe> method
2.ajax method
ajax+ stream implementation without frame limit block refresh:
Main Frame Index page:
Js:
$ (function () {
$ ("#dialog"). Dialog ({
width:500,
height:550
});
$ ("#dialog"). OpenDialog ();
$ ("#dialog"). Hide ();
});
Html:
< div id= "dialog" >
</div>
Child frames page:
Js:
function Opendia () {
var querystr={
id:$ ( ' #id '). Val ()
};
$.get ("itemplot.asp", querystr,function (data ) {
/ / Gets the div object on the main frame
var index_dialog=window.parent.parent.$ (" #dialog");
/ / fill in the HTML text stream fetched by the AJAX submission page into the main frame div
index_dialog.html (data);
/ /make its gradient Display
index_dialog.fadein ( );
//ok
});
}
Data source page:
Note that the head and title tags are removed from the jquery request page.
When you add the Close button, be careful not to window.close (), just empty the div and hide it. :
Function Diaclose () {
var index_dialog=window.parent.parent.$ ("#dialog");
Index_dialog.empty ();
Index_dialog.fadeout ();
}