Page 1 of 1

Changing page objects at run time

Posted: Wed May 15, 2019 7:35 am
by alex4orly
Please have a look at this link:
https://communitylifestyleaccommodation ... ources.php
At the bottom of the page there is a Text line - Text5

On clicking the link - I trigger two evants :
1st- Hide the text object Text5
2nd - Call Javascript : window:reload(true);

I now want to stretch vertically the iFrame to fill up the extra space cleared at the bottom of the page

Any idea on how to do that?

Thanks

Re: Changing page objects at run time

Posted: Wed May 15, 2019 7:41 am
by [RZ]
what the browser does from the server is correct
the page is loaded and the initial visibility of the object is visible by default
if you want to reload the page and remain the object hidden you must use cookies

Re: Changing page objects at run time

Posted: Wed May 15, 2019 8:28 am
by alex4orly
Hello RZ,

Sorry, maybe I didn't explain myself.
The einitial page load, shows a html page inside an iFram
The iFrame is shorter in height to allow space for the text item at the bottom

Once this text item is gone, I want the new page to load into a higher iFrame
Therefore, I want to stretch the iFrame Vertically

Any idea how?
Thanks

Re: Changing page objects at run time

Posted: Wed May 15, 2019 9:12 am
by [RZ]
yes
it requires:
1) advanced programming knowledge
2) same domain for both pages

Re: Changing page objects at run time

Posted: Wed May 15, 2019 10:42 pm
by alex4orly
I created a test page here : https://communitylifestyleaccommodation ... retch.html
I created a simple Javascript function in the Header section with this code:

<script type="text/javascript">
function stretchiFrame()
{
getElementById('InlineFrame1').height = "200";
}
</script>

In the events for the link
1) I hide the Text5 element
2) I call the function above
3) I call the Javascript : window(reload(true);

But, it doesn't chenage the iFrame height

Any suggestions?

Thanks

Re: Changing page objects at run time

Posted: Thu May 16, 2019 6:08 am
by Pablo

Re: Changing page objects at run time

Posted: Thu May 16, 2019 6:22 am
by alex4orly
Thanks Pablo,

Too complex for what I want, I can simply create another page with the new iFrame and swicth between
My case does NOT depand on content, it is a one size change only

Cheers