J'ai un problème avec ma fenêtre contextuelle JavaScript. Je suis arrivé à deux fonctions de la fenêtre pop up:Javascript Conflit de la fonction WIndows PopUp
La première fenêtre pop-up d'une fenêtre ouvrira une nouvelle fenêtre contient une URL de la page
ressembler à:
<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()}
}
La deuxième fenêtre pop-up de la fenêtre saisira le contenu dans cette page HTML et montrer le contenu dans une fenêtre pop-up.
Par exemple;
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>
Le 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()}
}
Si je lance la contactForm pop-up fonction première, puis je clique sur la fonction showBox. Je reçu un message d'erreur JavaScript:
Autorisation refusée pour obtenir la propriété de window.document Ligne 43
est cette ligne de code
showBoxPopupWin.document.write (orgin_div_content);
je voudrais avoir différents pop-up les fenêtres.