Salve a tutti del forum.
Cliccando su un link attraverso XML si apre questa pagina in una nuova finestra; vorrei inserire uno Java Script che dice che se non viene chiusa attraverso il suo pulsante non permette in alcun modo di tornare alla finestra principale.
Grazie per l'attenzione:)
Ecco il codice:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style>
html, body, #tabella {
height:100%;
margin: 0;
padding: 0;
border: none;
text-align: center;
}
{
margin: 0 auto;
text-align: left;
vertical-align: middle;
width: 400px;
}</style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>AAAA</title>
<style type="text/css">
<!--
body {
background-color: #9400D7;
}
-->
</style>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
function MM_callJS(jsStr) { //v2.0
return eval(jsStr)
}
//-->
</script>
</head>
<body>
<table id="tabella">
<tr>
<td><div align="center">
<table width="500" border="0" cellspacing="1">
<tr align="center" valign="top">
<td height="80"><div align="center"><img src="1.gif" width="468" height="78" /></div></td>
</tr>
<tr align="center" valign="top">
<td><div align="center"><img src="2.gif" width="468" height="51" /></div></td>
</tr>
<tr>
<td height="163"><div align="center"><img src="3" width="468" height="161" /></div></td>
</tr>
<tr>
<td><div align="center"><a href="javascript:;" onclick="MM_callJS('this.close()')"><img src="close.gif" width="80" height="23" border="0" /></a></div></td>
</tr>
<tr>
<td height="42"><div align="center"><img src="stopspitting.gif" width="486" height="41" /></div></td>
</tr>
<tr>
<td height="25"><div align="center">
<table border="0" cellspacing="1" cellpadding="0" width="715" style='width:341.25pt'>
<tr align="center" valign="top">
<td style='padding:.75pt .75pt .75pt .75pt'>
<p class="MsoNormal" align="center" style='text-align:center'><script language="" type="text/javascript">
/***********************************************
- Gabs
***********************************************/
var memorywidth="468px" //scroller width
var memoryheight="20px" //scroller height
var memorybgcolor="#9400d7" //scroller background
var memorypadding="2px" //padding applied to the scroller. 0 for non.
var borderCSS="border: 1px white;" //Border CSS, applied to scroller to give border.
var memoryspeed=2 //Scroller speed (larger is faster 1-10)
var pauseit=1 //Pause scroller onMousever (0=no. 1=yes)?
var persistlastviewedmsg=1 //should scroller's position persist after users navigate away (1=yes, 0=no)?
var persistmsgbehavior="onload" //set to "onload" or "onclick".
//Specify the scroller's content (don't delete <nobr> tag)
//Keep all content on ONE line, and backslash any single quotations (ie: that's great):
//*******************************************************************************************
// NOTES
//*******************************************************************************************
// colore titolo TITOLI bianco #FFFFFF, colore nero #000000
var memorycontent='<nobr><FONT Color="#FFFFFF" span style="font: bold 14px arial">XXXXXXX<FONT Color="#000000" span style="font: bold 14px arial">YYYYYYYYY</p> </span></nobr>'
//*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
////NO NEED TO EDIT BELOW THIS LINE////////////
var combinedcssTable="width:"+(parseInt(memorywidth)+6)+"px;background-color:"+memorybgcolor+";padding:"+memorypadding+";"+borderCSS+";"
var combinedcss="width:"+memorywidth+";height:"+memoryheight+";"
var divonclick=(persistlastviewedmsg && persistmsgbehavior=="onclick")? 'onClick="savelastmsg()" ' : ''
memoryspeed=(document.all)? memoryspeed : Math.max(1, memoryspeed-1) //slow speed down by 1 for NS
var copyspeed=memoryspeed
var pausespeed=(pauseit==0)? copyspeed: 0
var iedom=document.all||document.getElementById
if (iedom)
document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-10000px">'+memorycontent+'</span>')
var actualwidth=''
var memoryscroller
if (window.addEventListener)
window.addEventListener("load", populatescroller, false)
else if (window.attachEvent)
window.attachEvent("onload", populatescroller)
else if (document.all || document.getElementById)
window.onload=populatescroller
function populatescroller(){
memoryscroller=document.getElementById? document.getElementById("memoryscroller") : document.all.memoryscroller
memoryscroller.style.left=parseInt(memorywidth)+8+"px"
if (persistlastviewedmsg && get_cookie("lastscrollerpos")!="")
revivelastmsg()
memoryscroller.innerHTML=memorycontent
actualwidth=document.all? temp.offsetWidth : document.getElementById("temp").offsetWidth
lefttime=setInterval("scrollmarquee()",20)
}
function get_cookie(Name) {
var search = Name + "="
var returnvalue = ""
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset)
if (end == -1)
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}
function savelastmsg(){
document.cookie="lastscrollerpos="+memoryscroller.style.left
}
function revivelastmsg(){
lastscrollerpos=parseInt(get_cookie("lastscrollerpos"))
memoryscroller.style.left=parseInt(lastscrollerpos)+"px"
}
if (persistlastviewedmsg && persistmsgbehavior=="onload")
window.onunload=savelastmsg
function scrollmarquee(){
if (parseInt(memoryscroller.style.left)>(actualwidth*(-1)+8))
memoryscroller.style.left=parseInt(memoryscroller.style.left)-copyspeed+"px"
else
memoryscroller.style.left=parseInt(memorywidth)+8+"px"
}
if (iedom){
with (document){
document.write('<table border="0" cellspacing="0" cellpadding="0" style="'+combinedcssTable+'"><td>')
write('<div style="position:relative;overflow:hidden;'+combinedcss+'" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=memoryspeed">')
write('<div id="memoryscroller" style="position:absolute;left:0px;top:0px;" '+divonclick+'></div>')
write('</div>')
document.write('</td></table>')
}
}
</script>
</p>
</td>
</tr>
</table>
</div></td>
</tr>
<tr align="center" valign="top">
<td><div align="center">
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0','width','468','height','60','align','middle','src','Player027','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','bgcolor','#9400D7','movie','Player027' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="468" height="60" align="middle">
<param name="movie" value="Player027.swf" />
<param name="quality" value="high" /><param name="BGCOLOR" value="#9400D7" />
<embed src="3.swf" width="468" height="60" align="middle" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" bgcolor="#9400D7"></embed>
</object>
</noscript></div></td>
</tr>
</table>
</div>
</td></tr></table></body>
</html>