Merci pour ta réponse.
Toutes les pages du site sont à priori dans le même onglet pour une utilisation normale.
Les popups servent à faciliter la consultation ou l'administration.
Je peux éventuellement détecter le changement de page ( voir essai avec page1.html )
mais pas les "reload"
exemple :
page1.html
<html>
<head>
<title>Page 1</title>
<script type="text/javascript">
var VE= null;
var w = null;
var quitter = 0;
function popup( url, nom, option ) {
w = window.open(url,nom,option);
w.focus();
}
function open_VE() {
popup( 'page3.html', 'VE', 'width=200,height=200,top=200,left=200' );
VE = w;
}
function fermer_popup() {
if ( !quitter ) alert('fermer');
}
</script>
</head>
<body onBeforeunLoad='fermer_popup()' >
<a href="#" onclick="open_VE();">Ouvrir popup</a>
<br />
<a href="page2.html" onClick='quitter=1';>page 2</a>
</body>
</html>
page2.html
<html>
<head>
<title>Page 2</title>
<script type="text/javascript">
var VE= null;
var w = null;
function popup( url, nom, option ) {
w = window.open(url,nom,option);
w.focus();
}
function open_VE() {
if ( VE || !VE.closed ) {
alert( "popup déjà ouverte" );
}
else {
popup( 'page3.html', 'VE', 'width=200,height=200,top=200,left=200' );
VE = w;
}
}
</script>
</head>
<body>
<a href="#" onclick="open_VE();">Ouvrir popup</a>
<br />
<a href="page1.html" >page 1</a>
</body>
</html>
page3.html (popup )
<html>
<head>
<title>popup</title>
<script type="text/javascript">
function suivi() {
opener.VE = self.window;
}
setInterval('suivi()',200);
</script>
</head>
<body>
blabla
</body>
</html>