Answered by:
How to open any web page from other web site to own web site page?

Question
-
User2003675111 posted
Hi All,
How to open google home page inside our own web page on a click.
google home page should be open inside content placeholder.
Regards,
Neeraj
Tuesday, November 12, 2019 6:54 AM
Answers
-
User541108374 posted
Hi,
you could do it with an iframe and some code:
<script> function setURL(url){ document.getElementById('iframe').src = url; } </script> <iframe id="iframe" src="idreesinc.com/research.html" /> <input type="button" onclick="setURL('URLHere')" />
Code snippet taken from https://stackoverflow.com/questions/10524990/button-or-link-that-changes-page-in-iframe.
Kris
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Tuesday, November 12, 2019 8:10 AM -
User-474980206 posted
Note, many sites have set their security such that they can not be hosted in a frame or iframe.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Tuesday, November 12, 2019 3:21 PM
All replies
-
User541108374 posted
Hi,
you could do it with an iframe and some code:
<script> function setURL(url){ document.getElementById('iframe').src = url; } </script> <iframe id="iframe" src="idreesinc.com/research.html" /> <input type="button" onclick="setURL('URLHere')" />
Code snippet taken from https://stackoverflow.com/questions/10524990/button-or-link-that-changes-page-in-iframe.
Kris
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Tuesday, November 12, 2019 8:10 AM -
User-474980206 posted
Note, many sites have set their security such that they can not be hosted in a frame or iframe.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Tuesday, November 12, 2019 3:21 PM -
User2003675111 posted
Getting below error.
Please suggest how to resolve.
This content cannot be displayed in a frame
Wednesday, November 13, 2019 9:00 AM -
User-474980206 posted
you need to convince the owner of the website to allow you to display it in a frame. if they agree, they will give you the required code.
Wednesday, November 13, 2019 9:32 PM -
User-736603850 posted
Hi,
I don't think it's a good idea, it could give you a lot of problems and it could slow down the entire page load.
If you really need it, Obviously you need the consent of the website owner to incorporate it into your web page.
If you have consent you must use the html iframe tag.
You'll find a lot of examples in this website https://www.w3schools.com/tags/tag_iframe.asp
Tuesday, December 3, 2019 2:44 PM