Ho trovato questo che mi sembra faccia proprio al caso ma va ripulito xchè mi sembra che faccia un doppio controllo a me serve solo che verifichi l'url mandante, se è diverso allora redirige, chi mi aiuta?
<script language="JavaScript">
<!-- hide from older browsers
function checkOpener(){
var mainFrame;
var mainURL;
if(parent.window.opener){
mainURL = parent.window.opener.document.location.toString();
if((mainURL.indexOf('oddcast.com')<=0)&&(mainURL.i ndexOf('sitepal.com')<=0)) parent.document.location = "http://www.sitepal.com/tts/";
}else{
document.location = "http://www.oddcast.com/tts/";
}
}
//turned ON on April 12, 2005 by Sergey (requested by Gil)
checkOpener();
// stop hiding -->
</script>
Thanx


Rispondi quotando