Increase or decrease popup window height and width

Posted by Vishalneeraj-24503 under JavaScript on 1/9/2018 | Points: 10 | Views : 2571 | Status : [Member] [MVP] | Replies : 0
Hi All,

I am opening a popup window using method where i am passing height and width
parameters to method.
Window contains one div tag.

Now my requirement is like :-
When div size increases/decreases then window size increases/decreases accordingly.

Below is the code:-

var pop_window = null;
function Open_Popup_Window(URL, Height, Width)
try {
pop_window =, "_blank", 'status=no, resizable=1, toolbar=no,menubar=no,scrollbars=no,location=no,directories=no, width=' + Width + ', height=' + Height + ');
catch (e) {

return pop_window;

function ResizeWindow()
//alert('ResizeWindow' + pop_window);
if (pop_window)
pop_window.resizeTo(500, 650);

Above js function is written in js file.
I tried with resizeTo method with window object but it's getting null when calling ResizeWindow function from different page then pop_window object is getting null.


(No response found.)

Login to post response