自分のウェブサイトに「良い」ポップアップウィンドウを実装しようとしているので、いくつかのウェブバナーのポートフォリオの例を表示することができます。実際のバナーを見たい場合は、クリックするための「デモを開始する」ボタンがユーザーに表示されます。これはFirefox、Chrome & Safari(ともにPC & Mac)でうまくいきます。javascript:winopenの最小幅はIEですか?
私の3つのバナーのうちの2つはIEではうまく動作しますが、何らかの理由で1つ目のバナーが90以上のピクセルをポップアップします(s/b 160ピクセル、他の2つのバナーは715ピクセルと550ピクセル幅です)。私はまだJavascriptを初めて使っているので、最小の幅か問題がどこにあるのか分かりません。どんな考えも非常に役に立つでしょう!ありがとう! ここで私が使用していますJavascriptコードです:
<script type="text/javascript">
<!--
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes';
win=window.open(mypage,myname,settings);}
// -->
</script>
<script type="text/javascript">
<!-- Begin
function winopen(url,a,b){
newwin=window.open(url,a,b)
}
// End -->
</script>
そして、ここではそれが上に作用するのHTMLれる:
<h3>MAve Web Banner <a href="javascript:winopen('http://www.mightyjen.com/swf/MAve_FlashBanner_160x600.html','blank','width=160,height=600,scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no')" class="formButton">Launch Demo</a></h3>
実際のポップアップウィンドウの代わりにライトボックスを使用することを検討してください。もはや私たちは2000年になっていません。 ;) – ThiefMaster