I'm using winbox.js https://nextapps-de.github.io/winbox/ to create iframes and within each I'm loading local php pages which all have jQuery available.
In the main parent window I'm loading winbox.js and creating a default window as follows:
var test1 = new WinBox('Users', {
id: 'test1',
x: "center",
y: "center",
url: '/test/page1.php'
})
In page1.php jQuery is loaded and now I want to run the winbox.resize() command to resize the iframe.
From the iframe I can access the winbox.id instance property using parent.text1.id and the returns the correct id for this iframe.
The docs say you can use resize as follows:
var winbox = new WinBox("Custom Viewport");
winbox.resize("50%", "50%")
.move("center", "center");
So I've tried in the iframe to use:
parent.test1.resize("50%", "50%").move("center", "center")
But that just shows the following in the console.
Uncaught TypeError: parent.test1.resize is not a function
I can resize the iframe using jQuery with:
$('#test1', window.parent.document).height( '100px' );
This works, but if you manually try to resize the winbox it jumps back to it's original size before resizing. I'm guessing this is due to me manually resizing it and not using the built in options.
Can some one advise how to do this ?
Thanks