Revils
Revils

Reputation: 1508

Load external https page in div

I am trying to load an external site (local iis), into a div from a main site (local iis). Say for example this is the external site: 'https://www.ExternalSite.com/'

Simply browse to the external site, which is MVC Asp, does not work because the view needs parameters. There has been a redirection attached from the main site, which gets the parameters and redirects to the external site. Now I do not want the main site to be left and redirected to the external site, I have build a modal dialog, which needs to display the view of the external site.

If I perform:

var redirectionUrl = '/redirect.aspx/<parameters>';
$('#ModalBody').load(url);

It loads the redirection form, which I should submit to get the external page.

$('#redirectionform').submit();

However this redirects the entire browser.

Is there a way to perform the redirect and show the contents of the redirected page content into the modal div?

Upvotes: 0

Views: 439

Answers (1)

anand
anand

Reputation: 1579

You can load an external site in the main site by using 'iframe'. like below.

<div>
    <iframe src = "https://www.ExternalSite.com/" width = "100%" height="1000" frameBorder="0"></iframe>
</div>

The external site will load inside the iv only.
hope this helps

Upvotes: 1

Related Questions