...

View Full Version : height and width



Rappa
12-14-2005, 02:37 AM
im trying to get my new window a certain size but nothing im doing is working. I dont know why i cant remember how to do this

so i got

<a href="url" target="_blank">name</a>

i want it to be a certain size when opened
so i tried

<a href="url" target="_blank" width="500" height="400">name</a>

but that didnt work

and also, how would i center it when opened?

_Aerospace_Eng_
12-14-2005, 02:44 AM
You are no where near the solution.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Size the window</title>
<script type="text/javascript">
<!--
function openWin(url,wid,hgt){
sw=(screen.width-wid)/2;
sh=(screen.height-hgt)/2;
newwin=window.open(url,'newwin','width='+wid+',height='+hgt+',left='+sw+',top='+sh+',scrollbars=0,me nubar=0,toolbars=0,status=0');
newwin.focus();
}
//-->
</script>
</head>

<body>
<a href="http://www.codingforums.com" onclick="openWin(this.href,'500','500');return false">Coding Forums</a>
</body>
</html>

Rappa
12-14-2005, 02:48 AM
lol thx, pff i was close... :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum