I've got a form which contains some hidden fields that are only shown depending on the answer to a Yes/No radio button question.
This form is used on multiple external website using an iframe, therefore are on a different domain.
How can I change the height of the iframe depending on if these hidden field are shown or not. The way they are shown/hidden is using jquery show/hide in a separate scripts.js file. E.g
$('#show').click(function(){
$('#additional_fields').show('fast');
});
$('#hide').click(function(){
$('#additional_fields').hide('fast');
});
<div id="additional_fields" style="display:none;"> hidden fields here
</div>
iframe that contains the above:
<iframe id="idIframe" src="http://websites.com/form.php" scrolling="no" height="1000" width="950" border="0"/>
UPDATE
Ive managed to get it to work using the following
$("#idIframe", top.document).css({ height: 1750 });
however, this only works when using the same domain.