Skip to main content
Known Participant
August 20, 2010
Question

how to resize this window

  • August 20, 2010
  • 2 replies
  • 511 views

hi below is code when i clicked to open window form.cfm i need to resize to different height and width , i am not sure how to set height and width any help?

function lookup() {
document.location = 'form.cfm';
}


<td align="center">
<input type="button" value="Look" class="p" style="width:250px;"  onClick="lookup();">
</td>


Thanks
This topic has been closed for replies.

2 replies

August 31, 2010

Please try this too

function lookup(file,window)

     childWindow=open(file,window,'resizable=yes,width=825,height=750,scrollbars=yes');
    
}

Inspiring
August 30, 2010

This is rather a JavaScript question. Assuming your form.cfm is a popup, there are number of JavaScript functions to open popup with any size you want (Google keyword : JavaScript popup script).

If you are trying to resize the same browser, you can use JavaScript function window.resizeTo(width,height) like

function lookup() {
window.resizeTo(1024,768);
}

But I don’t think there is a way you can forward the user to another window with specification for that window to resize automatically. only way you can do that is, if you pass your size values in the url as url values and in the form.cfm page, if you write a javascript mix with coldfusion to resize that page, if the url values are passed in.

Thanks

Sam
cflove.org