webrock
09-21-2003, 07:42 PM
Hi,
Can someone please let me know where I would insert the code for sizing these pop-up windows to a specific height & width??? Here's what I've got so far.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>untitled</title>
<script type="text/javascript" language="javascript">
var putItThere = null;
var chasm = screen.availWidth;
var mount = screen.availHeight;
var wd = chasm*.9; // percentage of screen width occupied by pop-up
var ht = mount*.8; // percentage of screen height occupied by pop-up
function deadCenter(url)
{
putItThere = window. open(url,'putItThere','width='+wd+',height='+ht+',
left='+((chasm-wd-10)*.5)+',top='+((mount-ht-5)*.5)+',scrollbars,status,titlebar');
if (putItThere & !putItThere.closed)
putItThere.focus();
}
</script>
</head>
<body>
<form name="f1">
<select name="s1">
<option value="" selected="selected">- Choose Your Girl -</option>
<option value="jcorday.htm">Corday</option>
<option value="cindy.html">Cindy Alexander</option>
</select>
<input type="button" name="mybutton" value="Go"
onclick="v=s1.options[s1.selectedIndex].value;if(v)return deadCenter(v)">
</form>
</body>
</html>
Thanks so much!
Can someone please let me know where I would insert the code for sizing these pop-up windows to a specific height & width??? Here's what I've got so far.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>untitled</title>
<script type="text/javascript" language="javascript">
var putItThere = null;
var chasm = screen.availWidth;
var mount = screen.availHeight;
var wd = chasm*.9; // percentage of screen width occupied by pop-up
var ht = mount*.8; // percentage of screen height occupied by pop-up
function deadCenter(url)
{
putItThere = window. open(url,'putItThere','width='+wd+',height='+ht+',
left='+((chasm-wd-10)*.5)+',top='+((mount-ht-5)*.5)+',scrollbars,status,titlebar');
if (putItThere & !putItThere.closed)
putItThere.focus();
}
</script>
</head>
<body>
<form name="f1">
<select name="s1">
<option value="" selected="selected">- Choose Your Girl -</option>
<option value="jcorday.htm">Corday</option>
<option value="cindy.html">Cindy Alexander</option>
</select>
<input type="button" name="mybutton" value="Go"
onclick="v=s1.options[s1.selectedIndex].value;if(v)return deadCenter(v)">
</form>
</body>
</html>
Thanks so much!