Reputation: 98
I am wondering if there is a way to show a page within another page as a dialog box or pop up? let's say I have page ( a.shtml ) and I am working in page( b.shtml ) is there a way to pop up page ( a.shtml ) as dialog box within page ( b.shtml )?
Please let me know if my question is not clear and please consider that this is my first question here. Thanks in advance
Upvotes: 0
Views: 27
Reputation: 2368
I believe load() can help you achieve this... https://www.w3schools.com/jquery/ajax_load.asp
HTML:
<div id="pageA"></div>
jQuery/AJAX: Assuming the pages are in the same folder...
$(function(){
$('#pageA').load('./a.shtml');
});
Upvotes: 0
Reputation: 2867
You may want to look into iframes, depending on what you're trying to do. These are DOM elements that display another URL, and can be sized and controlled using regular CSS or via js: iframes
Bear in mind that communicating between your page and the iframe may only be possible if they are the same origin: cross-window communication
Upvotes: 1