1
Hello
I am needing to open an external page through an AJAX request on my ROW in Bootstrap, but I am not succeeding, I am following the tutorial of the link below, but it is not opening my page in Bootstrap ROW, how can I do ? Have some native Bootstrap function for that ?
http://tedk.com.br/blog/html/carregar-uma-pagina-dentro-de-uma-div-com-ajax/
Code:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>load demo</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<style>
body {
font-size: 12px;
font-family: Arial;
}
</style>
</head>
<body>
<b>Projects:</b>
<div id="new-projects" style="width:400px, height:400px"></div>
<script type="text/javascript">
$( "#new-projects" ).html('<object data="https://answall.com"/>');
</script>
</body>
</html>
Thank you
I know your code, but it’s not running, because ?
– abduzeedo
See if you are loading jQuery. A question, the page is external, another domain?
– Edvaldo Silva
So, this is showing up on my console ( Refused to display 'https://answall.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'. en.stackoverflow.com/ Failed to load Resource: net::ERR_BLOCKED_BY_RESPONSE /favicon.ico Failed to load Resource: the server responded with a status of 404 (Not Found) )
– abduzeedo
And I put your script up on an online host. But it doesn’t work.
– abduzeedo
The reason is dominance. Ex: if I am at www.meusite.com I can call www.meusite.com/otherapy, but calling www.google.com for security does not allow.
– Edvaldo Silva
That’s cool. Now it works. Thank you.
– abduzeedo