Reputation: 43
Problem: I have been working on my own jquery terminal, and the terminal is hosted in a popup window of the website. I have tried to create a command that changes the popup windows width and height on command, but it doesnt work.
What I have tried: I have tried the resizeTo() method, and the window.resizeTo() method, but it still doesnt work. I feel like im using the syntax wrong, but im not too sure, I have seen some examples already on resizeTo() and have a fair understanding how it works. This is the code I have so far for the command in my jquery terminal:
win: function(wid, hei) {
window.resizeTo(wid, hei)
},
This is the code I used to make the window popup:
function diff() {
var win = window.open('about:blank',"", "width=1100, height=600, border=0",'directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no');// <-- include the URL
var url = "https://myurl.com"
var iframe = win.document.createElement('iframe')
iframe.style.top = iframe.style.bottom = iframe.style.left = iframe.style.right = 0
iframe.style.position = "fixed"
iframe.style.width = "100%";
iframe.style.height = "100%";
iframe.style.border = "none";
iframe.src = url
win.document.body.appendChild(iframe)
}
Upvotes: 0
Views: 36