salve a tutti,
ho recuperato questo codice da un esempio di saibal e sto cercando di adattarlo.
trovo difficoltà soltanto per quello che è un passaggio forse obbligato che si effettua all'inizio.
codice della prima pagina:
codice:
<HTML>
<HEAD>
<TITLE>HTML.it - il sito italiano sul Web publishing</TITLE>
<style>
A:link, A:visited { text-decoration: none }
A:hover { text-decoration: underline }
</style>
<script language="Javascript">
var windowW=214
var windowH=270
var Yoffset=0
var windowStep=5
var moveSpeed=10
Xmode="right";
Xoffset=30;
var urlPop = "popup.htm"
var title = "titolo";
var autoclose = true
var windowX = (screen.width/2)-(windowW/2);
if (Xmode=="left") windowX=0+Xoffset;
if (Xmode=="right") windowX=screen.availWidth-Xoffset-windowW;
var windowY = (screen.availHeight);
var windowYstop = windowY-windowH-Yoffset;
var windowYnow = windowY;
s = "width="+windowW+",height="+windowH;
var beIE = document.all?true:false
function openWin(){
if (beIE){
PFW = window.open("","popFrameless","fullscreen,"+s)
PFW.blur()
window.focus()
PFW.resizeTo(windowW,windowH)
PFW.moveTo(windowX,windowY)
var frameString=""+
"<html>"+
"<head>"+
"<title>"+title+"</title>"+
"</head>"+
"<frameset rows='*,0' framespacing=0 border=0 frameborder=0>"+
"<frame name='top' src='"+urlPop+"' scrolling=auto>"+
"<frame name='bottom' src='about:blank' scrolling='no'>"+
"</frameset>"+
"</html>"
PFW.document.open();
PFW.document.write(frameString)
PFW.document.close()
} else {
PFW=window.open(urlPop,"popFrameless","scrollbars,"+s)
PFW.blur()
window.focus()
PFW.resizeTo(windowW,windowH)
PFW.moveTo(windowX,windowY)
}
PFW.focus()
if (autoclose){
window.onunload = function(){PFW.close()}
}
movePFW();
}
function movePFW(){
if (document.all){
if (windowYnow>=windowYstop){
PFW.moveTo(windowX,windowYnow);
PFW.focus();
windowYnow=windowYnow-windowStep;
timer=setTimeout("movePFW()",moveSpeed);
}else{
clearTimeout(timer);
PFW.moveTo(windowX,windowYstop);
PFW.focus();
}
}else{
PFW.moveTo(windowX,windowYstop);
}
}
</script>
</HEAD>
<BODY BGCOLOR="#000000" onLoad="openWin()">
</BODY>
</HTML>
codice della seconda pagina:
codice:
<html>
<head>
<style>
body{
border: 3px solid #ffffff;
scrollbar-base-color:#000000;
}
A:link, A:visited { text-decoration: none }
A:hover { text-decoration: none }
</style>
<title></title>
</head>
<body onload="top.window.focus()" bgcolor="#000000" link="#ffffff" vlink="#ffffff" alink="#ffffff" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100%" height="100%">
<center>
chiudi
</center>
</td>
</tr>
</table>
</center>
</body>
</html>
il problema è che quando si apre la chromeless qualche istante dopo si apre anche una pagina che ovviamente è il body della prima pagina
non ci sarebbe la possibilità di evitare questa sgradevole apertura durante il persistere della chromeless?
Grazie mille!