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

target__blank windows smaller than site window

Status
Not open for further replies.

bch33

Technical User
Joined
Oct 13, 2001
Messages
151
Location
US
Is there a way to make the target_blank windows smaller than the original site window when they pop up?

thanks,
bch
 
Hi,
place this javascript in the head of your html:
Code:
<HEAD>
<SCRIPT language=JavaScript>
<!--
/* Function that opens popups. */

function openPopup(url,mywidth,myheight)
{
MyWindow = window.open(url,'foto','toolbar=0,location=0,directories=0,statusbar=0,menubar=0,scrollbars=0,resizable=0,width='+mywidth+',height='+myheight);
}
//-->
</SCRIPT>
</HEAD>



call the function like this in your html body:

Code:
<A href=&quot;javascript:openPopup('yourpage.htm','200','200')&quot; >
Change the 200 to the size you want.
If you want the toolbar etc to be present replace the 0 by 1 in the function. e.g. toolbar=1,location=1 etc.
regards, goaganesha
 
<a href=&quot;#&quot; onClick=&quot;window.open('your_page_here.html','','height=200,width=200');return false;&quot;>
Click Here
</a>

Play with this javascript. When in doubt, deny all terms and defnitions.
 
Thanks for all the replies--- will give them a try
appreciate it
bch
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top