|
|
|
| Взял этот скрипт для этого-
<script language="javascript">
function getClientWidth()
{
return document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientWidth:document.body.clientWidth;
}
function getClientHeight()
{
return document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientHeight:document.body.clientHeight;
}
var win = null;
function NewWindow(mypage,myname,w,h,scroll){
var w=getClientWidth()-(getClientWidth()*0.3);
var h=getClientHeight()-(getClientHeight()*0.3);
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}
</script>
<a href="http://wsabstract.com" onclick="NewWindow(this.href,'name','400','400','yes');return false">Website Abstraction</a>
|
но в IE окно открывается в новой вкладке! проверил только в ФФ и Эксплорере?
как заставить Эксплорер открывать не во вкладке ,а в новом окне ? | |
|
|
|
|
|
|
|
для: segafrompiter
(23.04.2009 в 18:24)
| | команды showModalDialog и showModelessDialog вам о чем-нибудь говорят? | |
|
|
|
|
|
|
|
для: segafrompiter
(23.04.2009 в 18:24)
| | а вот и неправда. открывать окно во вкладке или в новом окне вы устанавливаете в браузере.
и скриптом на эту установку повлиять не можете. | |
|
|
|