Hello,
I have added IFRAME into one of my confluence page. Target URL requires HTTP Basic Authentication so i had to use the following javascript to authenticate the target.
Although https://www.atlassian.com URL works as iframe.src it does not work with my original URL (that URL also belong to me). Both abc.com and atlassian.com are added to whitelist within admin console.
I get "v1.abc.com connection refused message" within iframe window. What could be the reason or how to debug this?
<form id="login" target="frame" method="post" action="https://v2.abc.com/">
<input type="hidden" name="username" value=“XXXX” />
<input type="hidden" name="password" value=“YYYY” />
</form>
<iframe id="frame" name="frame" noborder="0" width="830" height="800" scrolling="yes" seamless></iframe>
<script type="text/javascript">
// submit the form into iframe for login into remote site
document.getElementById('login').submit();
// once you're logged in, change the source url (if needed)
var iframe = document.getElementById('frame');
iframe.onload = function() {
if (iframe.src != "https://www.atlassian.com/") {
// iframe.src="https://v2.abc.com/abc/visual/index.php?service_id=22";
iframe.src="https://www.atlassian.com";
}
}
</script>
Best Regards,
Emre.
The reason is that the website you are embedding in the frame does not support iframes well enough to take the data you are passing into it. Most sites don't, as they don't expect to be embedded and the code to do it is generally horrid and far more effort than it is worth. You'll need to amend the target site so that it understands that it is in a frame and can accept the data the source frame sends it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.