djcuca
24-01-2007, 21:19
ciao a tutti.
Ho un problema in quanto cliccando su un link, si dovrebbe aprire un pop-up che contiene testo,css, e un codice js per una freccietta che si muove a seconda dello scroll del browser.
Con Firefox (come sempre) nessun problema.
ma IE non mi apre il POPUP ma bensì una nuova pagina(con il giusto contenuto).
potete aiutarmi? questo è il codice js per la freccietta:
/*<script language="JavaScript" type="text/javascript">
<!--
function setVariables(){
if (navigator.appName == "Netscape") {
if (parseInt(navigator.appVersion) >= 5){
v=".top=";
h=".left=";
dS="document.getElementById(\"";
sD="\").style";
y="window.pageYOffset";
x="window.pageXOffset";
}
else {
v=".top=";
h=".left=";
dS="document.";
sD="";
y="window.pageYOffset";
x="window.pageXOffset";
}
}
else {
h=".pixelLeft=";
v=".pixelTop=";
dS="";
sD=".style";
y="document.body.scrollTop";
x="document.body.scrollLeft";
}
checkLocationA()
}
movex=0,movey=0,xdiff=0,ydiff=0,ystart=0,xstart=0
function checkLocation(){
object="object1";
yy=eval(y);
xx=eval(x);
ydiff=ystart-yy;
xdiff=xstart-xx;
if ((ydiff<(-1))||(ydiff>(1))) movey=Math.round(ydiff/10),ystart-=movey
if ((xdiff<(-1))||(xdiff>(1))) movex=Math.round(xdiff/10),xstart-=movex
if (ystart>=83){
eval(dS+object+sD+v+(ystart+10));
} else {
eval(dS+object+sD+v+83);
}
eval(dS+object+sD+h+xstart);
setTimeout("checkLocation()",10);
}
function checkLocationA(){
ystart=eval(y);
xstart=eval(x);
}
//-->
</script> */
levandolo, IE apre normalmente il popup. Ci può essere una soluzione? non mastico molto JS..
Grazie
Ho un problema in quanto cliccando su un link, si dovrebbe aprire un pop-up che contiene testo,css, e un codice js per una freccietta che si muove a seconda dello scroll del browser.
Con Firefox (come sempre) nessun problema.
ma IE non mi apre il POPUP ma bensì una nuova pagina(con il giusto contenuto).
potete aiutarmi? questo è il codice js per la freccietta:
/*<script language="JavaScript" type="text/javascript">
<!--
function setVariables(){
if (navigator.appName == "Netscape") {
if (parseInt(navigator.appVersion) >= 5){
v=".top=";
h=".left=";
dS="document.getElementById(\"";
sD="\").style";
y="window.pageYOffset";
x="window.pageXOffset";
}
else {
v=".top=";
h=".left=";
dS="document.";
sD="";
y="window.pageYOffset";
x="window.pageXOffset";
}
}
else {
h=".pixelLeft=";
v=".pixelTop=";
dS="";
sD=".style";
y="document.body.scrollTop";
x="document.body.scrollLeft";
}
checkLocationA()
}
movex=0,movey=0,xdiff=0,ydiff=0,ystart=0,xstart=0
function checkLocation(){
object="object1";
yy=eval(y);
xx=eval(x);
ydiff=ystart-yy;
xdiff=xstart-xx;
if ((ydiff<(-1))||(ydiff>(1))) movey=Math.round(ydiff/10),ystart-=movey
if ((xdiff<(-1))||(xdiff>(1))) movex=Math.round(xdiff/10),xstart-=movex
if (ystart>=83){
eval(dS+object+sD+v+(ystart+10));
} else {
eval(dS+object+sD+v+83);
}
eval(dS+object+sD+h+xstart);
setTimeout("checkLocation()",10);
}
function checkLocationA(){
ystart=eval(y);
xstart=eval(x);
}
//-->
</script> */
levandolo, IE apre normalmente il popup. Ci può essere una soluzione? non mastico molto JS..
Grazie