how can i resize my iframe to 100% height?
=> AP.resize('100%',100%') this does not work for the height value of course
i would like to have the iframe as big as possible, that there is no unused space and no scroll bars applied. therefore i need to know the height of my parent window. but this value is not accessible due to same origin policy.
Hello,
I just would like to give a quick update that we have the Atlassian Developer Community to properly address development questions:
https://community.developer.atlassian.com/
The mentioned portal was specifically created for development questions, where you will find articles and suggestions from third-party partners and Atlassian developers. Feel free to open a new topic about your question there!
Hey,
This method works for me.
First add ac-content attribute to the body tag:
<body class="ac-content">
Then in the script tag I added the following code, make sure that you have access to all.js
AP.resize('100%','100%');
AP.sizeToParent();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Florian Bauer,
Thanks for your question. Would you mind providing a more concrete situation relating to your request. For example, I assume you're interested in doing this specifically in Jira, but which type of page and area within the page? Jira and Connect has the concept of a general page which you app can fill out.
See https://developer.atlassian.com/cloud/jira/platform/about-jira-modules/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i just solved my problem. i was using the wrong web modul for jira. aparently the sizeToParent option is only available for general pages and also for jiraProjectPages (which is not yet part of the docs).
thank you guys for your help!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Florian Bauer, I've created https://ecosystem.atlassian.net/browse/ACJS-870 to improve the docs.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi! Try to put this in de footer of your page
<script id="connect-loader" data-options="sizeToParent:true;"> (function() { var getUrlParam = function (param) { var codedParam = (new RegExp(param + '=([^&]*)')).exec(window.location.search)[1]; return decodeURIComponent(codedParam); }; var baseUrl = getUrlParam('xdm_e') + getUrlParam('cp'); var options = document.getElementById('connect-loader').getAttribute('data-options'); var script = document.createElement("script"); script.src = baseUrl + '/atlassian-connect/all.js'; if(options) { script.setAttribute('data-options', options); } document.getElementsByTagName("head")[0].appendChild(script); })(); </script>
For more information go to
https://developer.atlassian.com/cloud/jira/platform/about-the-javascript-api/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thank you juan for you quick response!
if i try this with sizeToParent:true option or even force it manually by AP.sizeToParent (true) the iframe size is 300x149.3333 only, which is pretty tiny ;)
this is how the iframe tag gets rendered:
<iframe id="add.on.name__board__34fef5c1" name="some json here" src="url" referrerpolicy="no-referrer" class="ap-iframe full-size-general-page-fail"></iframe>
i am wondering what this full-size-general-page-fail class means?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.