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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sized pop up window

Status
Not open for further replies.

AirinGaps

Technical User
Nov 16, 2004
2
US
I know that this is really basic, but can anyone tell me how to create a new window that is sized. I know how to create the new window, but I am not sure about dictating the height/weight, toolbars and scrollbars. I have been looking around for a while and can't figure it out. [mad]
 
here you go (it should appear all on one line)...
Code:
window.open('myPage.htm','MyWindowName','top=0,left=0,width=600,height=400,resizable=yes,status=yes,toolbar=no,menubar=no')

Tony
________________________________________________________________________________
 
I'm using the following script:
Code:
var newwindow;
function newwinver(url)
{
	newwindow=window.open(url,'newwinver','height=800,width=600');
	if (window.focus) {newwindow.focus()}
}
function newwinhor(url)
{
	newwindow=window.open(url,'newwinhor','height=600,width=800');
	if (window.focus) {newwindow.focus()}
}

In the page, I call it with:
Code:
<a href="javascript:newwinhor('/images/image.jpg');">blah blah</a>

Works great for me. Of course, not for those folks who browse the web with javascript disabled. But then, I don't care about them.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top