trekkee
asked on
HRef window size
is there a way to control the size of the window opened by an <a href> ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
listening...
Preece
Preece
Yup! Use this javascript function;
<script language="javascript">
if (window.screen) {
var aw = screen.availWidth;
var ah = screen.availHeight;
aw = aw - 10;
ah = ah - 25;
}
var mypopup=null
function popup(URL) {
if ( mypopup && !mypopup.closed )
{ mypeopleup.close();
}
mypopup = window.open(URL,"phone", 'scrollbars=1,menubar=0,re sizable=1, background =white,too lbar=0,sta tus=0,top= 0,left=0,s creenX=0,s creenY=0,h eight=' + ah + ',width=' + aw);
}
</script>
It gets called like this;
<a href="javascript:popup('pa ge.asp')"> Click</a>
<script language="javascript">
if (window.screen) {
var aw = screen.availWidth;
var ah = screen.availHeight;
aw = aw - 10;
ah = ah - 25;
}
var mypopup=null
function popup(URL) {
if ( mypopup && !mypopup.closed )
{ mypeopleup.close();
}
mypopup = window.open(URL,"phone", 'scrollbars=1,menubar=0,re
}
</script>
It gets called like this;
<a href="javascript:popup('pa
<A HREF="index.html"
ONCLICK="window.open('iamw
'popup', 'toolbar=no,location=no,di
status=no,menubar=no,scrol
copyhistory=no,width=300,h