Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

opening a new window with prescribed measurements 1

Status
Not open for further replies.

rewdee

Programmer
Aug 17, 2001
295
US
I have just created a survey/response script that builds a chart based on a submit button. I want to display the chart in a new window within the Chart's dimensions +1.

Anyone know the code to opening a new window with a prescribed dimension?

Thanks,
Rewdee
 
<script language=javascript>
var x = window.open(url,handle,'width=200,height=200');
x.moveTo(100,100);
</script>

There's also a FAQ over in the javaScript forum of this site that tells all about all the properties you can set for new windows.

:)
paul
penny.gif
penny.gif
 
<!--//
//Open new window
function OpenWindow(sPath, iHeight, iWidth ) {
var winName = &quot;newWind&quot; + Math.round(Math.random() * 9999999);
window.open(sPath, winName, 'height=' + iHeight + ',width=' + iWidth + ',scrollbars,resizable,top=20,left=20')
}

//Open new window with Menubar
function OpenWindowWithMenubar(sPath, iHeight, iWidth ) {
var winName = &quot;newWind&quot; + Math.round(Math.random() * 9999999);
window.open(sPath, winName, 'height=' + iHeight + ',width=' + iWidth + ',scrollbars,resizable,menubar,top=20,left=20')
}
// -->


<a href=&quot;javascript:OpenWindow(' 530, 680)&quot;><Click here to open new window</a>


' just replace '530, 680' with whatever you calculate your chart's dimensions +1 to.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top