JavaScriptのポップアップウィンドウに問題があります。Javascript WIndows PopUp関数の競合
最初のウィンドウがポップアップが開きます新しいウィンドウがページのURLが含まれているような
ルック:
<a class="" onclick="kmt_contactFormPopup('http://uk.support.tomtom.com/app/ask',this)">[To the contact form..]</a>
function kmt_contactFormPopup(emailURL, aTag)
{
params = 'width=950px';
params +=',height=700';
params += 'screenX=250, screenY=80,';
params +='scrollbars=yes';
newwindow=window.open(emailURL,'name',params);
if (newwindow.focus) {newwindow.focus()}
}
第二の窓ポップアップがコンテンツをつかむだろうと私は2つのウィンドウには、機能がポップアップしましたこのHTMLページで、コンテンツをポップアップウィンドウに表示します。
たとえば、
Collect the error log <a href="#BOX01" onclick="kmt_ShowBoxPopup('BOX01', this);"><strong>[Show me how..]</strong></a><br /><br />
<div id="BOX01" style="display:none">
<table cellspacing="0" cellpadding="0" border="0" style="background-color:#ffffff;">
</tr>
</table>
</div>
javascriptの
function kmt_ShowBoxPopup(targetDivID, aTag)
{
var orgin_div_content=document.getElementById(targetDivID).innerHTML;
showBoxPopupWin =window.open("",'name','height=400,width=710,screenX=250,screenY=80, scrollbars=yes');
showBoxPopupWin.document.write (orgin_div_content);
if (window.focus) {showBoxPopupWin.focus()}
}
私はのContactFormを実行する場合、最初の機能をポップアップして、私はshowBox機能をクリックしてください。
許可はそれが
showBoxPopupWin.document.write (orgin_div_content);
は、私は別のポップアップがしたいのコード行である43行目
からプロパティWindow.documentを取得するために拒否されました:私はJavaScriptでエラーメッセージが表示されました窓。 'name'
と呼ばれるウィンドウがすでに開いている場合