PDA

View Full Version : > PROBLEMA Javascript e browsers/mac ?


Kid A
21-03-2003, 00.48.22
Eseguendo un Questionario online riscontro un problema di funzionamento in
ambiente MAC (sia con Explorer 5x sia Netscape 7),
mentre in Win nessun problema.

E' dovuto ad una incompatibilità server ASP che ospita questo questionario
online rispetto a sistema Mac,
oppure (come sospetto) c'è qualche incompatibilità dei codici Javascript
[della popup dove si dovrebbe eseguire tramite domande a risposta multipla
(con pulsanti radio) un quaetionario online]
con il DOM dei browsers per Mac?


Non potendo fornirvi il link (poiché l'accesso è solo tramite Login/Pwd
riservati, e neppure miei),
vi fornisco i codici che a mio pareri potrebbero essere la causa
dell'impasse.
I codici (che in parte ho modificato) sono questi:



<html>



* *<head>

* * * *<meta http-equiv="content-type"

content="text/html;charset=iso-8859-1">

* * * *<meta name="generator" content="Adobe GoLive 4">

* * * *<script LANGUAGE="Javascript">









function uscitaimprovvisa()

* *{

* *py=event.clientY;

* *if (py<0)

* *{

* *event.returnValue="ATTENZIONE! Chiudendo la finestra in questo modo il

sistema non registra definitivamente i dati e sarà possibile proseguire lo

stesso questionario in seguito.n Per registrare definitivamente i risultati

è necessario premere il pulsante 'ANNULLA' ('CANCEL') in questa finestra e

poi il pulsante 'ESCI' nella finestra principale, solo in questo caso il

sistema comunicherà il punteggio ottenuto. ";



* * * * }

* * * *//alert(py + "Uscendo i dati non verranno registrati

correttamente!")

* *}











function cancella_cmenu()

* *{

* * * *event.returnValue=false;



* *}



function inviaavanti()

{

document.forms('risposte').action=docume nt.forms('risposte').elements('havan

ti').value;

document.forms('risposte').submit();

}



function inviaindietro()

{

document.forms('risposte').action=docume nt.forms('risposte').elements('hindi

etro').value;

document.forms('risposte').submit();

}



function inviaavantiv()

{

document.forms('risposte').action=docume nt.forms('risposte').elements('havan

tiv').value;

document.forms('risposte').submit();

}



function inviaindietrov()

{

document.forms('risposte').action=docume nt.forms('risposte').elements('hindi

etrov').value;

document.forms('risposte').submit();

}



//segnala che è stat modificata una domanda e gestisce la rispota singola

function dommodificata(tipo,elem,nrisposte)



{



var lett =new Array();

lett[1]='a';

lett[2]='b';

lett[3]='c';

lett[4]='d';

lett[5]='e';

lett[6]='f';





document.forms('risposte').elements('hmo dificata').value="ok";

//alert(elem);

if (tipo=='s')

{



for (i=1; i<=nrisposte; i++)

{

* *if (!(i==elem))

* *{

* * strelem='risp' + lett[i];

* * document.forms('risposte').elements(stre lem).checked=false;

* * }

}

}

}



//chiamata quando ci si prepara a uscire

function uscita()

{

document.forms('risposte').elements('hus cita').value="ok";

document.forms('risposte').action=docume nt.forms('risposte').elements('hstru

scita').value;

document.forms('risposte').submit();

}



//se si decide di non uscire

function nouscita()

{

document.forms('risposte').elements('hus cita').value="no";

document.forms('risposte').action=docume nt.forms('risposte').elements('hstru

scita').value;

document.forms('risposte').submit();



}



//se si decide di uscire

function termina()

{

document.forms('risposte').action=docume nt.forms('risposte').elements('hstrt

ermina').value;

document.forms('risposte').submit();

}



function doLoad()

{

setTimeout( "refresh()", 90*60*1000 );

}

function refresh()

{



window.location.href=window.location.hre f

//window.location.reload( false );

}





</script>

* *</head>













<body onload="doLoad()" onbeforeunload='uscitaimprovvisa()'

xonkeydown='cancella_cmenu()' xoncontextmenu='cancella_cmenu()'

bgcolor="#FFFFFF"> * * * *<center>

* * * * * *<table border="0" width="100%" cellspacing="1" cellpadding="3">

* * * * * * * *<tr>

* * * * * * * * * *<td width="152" bgcolor="white" style="border: 1 solid

#000080" align="center" rowspan="3">Img/*******.gif</td>

* * * * * * * * * *<td bgcolor="#d90000" style="border: 1 solid #000080"

align="center" width="48%"><font color="white" size="2"

face="Arial">**************</font></td>

* * * * * * * * * *<td bgcolor="#d90000" style="border-right: 1 solid

#000080; border-top: 1 solid #000080; border-bottom: 1 solid #000080"

align="center" width="57%"><font color="white" face="Arial"

size="2">Questionario 002 </font><font face="Arial" size="2">


* * * * * * * * * * * *</font><font size="1" color="black"

face="Arial">(MINUTI: 0 circa)</font> </td>

* * * * * * * *</tr>

* * * * * * * *<tr>

* * * * * * * * * *<td width="48%" style="border-left: 1 solid #000080;

border-right: 1 solid #000080" bgcolor="#d90000" align="center"><font

color="white" size="1" face="Arial">Domanda n& 1 di 100</font></td>

* * * * * * * * * *<td width="57%" style="border-left: 1 solid #000080;

border-right: 1 solid #000080" bgcolor="#d90000" align="center"><font

color="white" face="Arial" size="1">Domande senza risposta:

100</font></td>

* * * * * * * *</tr>

* * * * * * * *<tr>

* * * * * * * * * *<td colspan="2" bgcolor="#b7cfe2" style="border-right: 1

solid #000080; border-bottom: 1 solid #000080">

* * * * * * * * * * * *<center>

* * * * * * * * * * * * * *<font color="#003466" size="1"

face="Arial">Tematica: DL</font></center>

* * * * * * * * * *</td>

* * * * * * * *</tr>

* * * * * *</table>

* * * *</center>

* * * *<center>

* * * * * *



* * * * * *<form name="risposte" method="POST" action="(Empty Reference!)">

* * * * * *<table border="0" width="90%" cellspacing="0" cellpadding="3"

height="110">

* * * * * * * *<tr height="49">

* * * * * * * * * *<td colspan="2" bgcolor="#b7cfe2" style="border: 1 solid

#000080" height="49"><font face="Arial" size="2">1) Che tipo di

informazione fornisce l'immagine scintigrafica?


* * * * * * * * * * * *


* * * * * * * * * * * *</font></td>

* * * * * * * *</tr>

* * * * * * * *<tr height="49">

* * * * * * * * * *<td width="84%" valign="top" bgcolor="white"

style="border-left: 1 solid #000080; border-right: 1 solid #000080;

border-bottom: 1 solid #000080" height="49"><font face="Arial"

size="2">funzionale


* * * * * * * * * * * *


* * * * * * * * * * * *</font></td>

* * * * * * * * * *<td width="16%" valign="top" bgcolor="white"

style="border-right: 1 solid #000080; border-bottom: 1 solid #000080"

height="49">

* * * * * * * * * * * *<center>

* * * * * * * * * * * * * *<font face="Arial" size="2"><input type="radio"

name="rispa" value="ON" onclick="dommodificata('s',1,5)"> </font></center>

* * * * * * * * * *</td>

* * * * * * * *</tr>

* * * * * * * *<tr height="49">

* * * * * * * * * *<td width="84%" valign="top" bgcolor="white"

style="border-left: 1 solid #000080; border-right: 1 solid #000080;

border-bottom: 1 solid #000080" height="49"><font face="Arial"

size="2">morfo-funzionale


* * * * * * * * * * * *


* * * * * * * * * * * *</font></td>

* * * * * * * * * *<td width="16%" valign="top" bgcolor="white"

style="border-right: 1 solid #000080; border-bottom: 1 solid #000080"

height="49">

* * * * * * * * * * * *<center>

* * * * * * * * * * * * * *<font face="Arial" size="2"><input type="radio"

name="rispb" value="ON" onclick="dommodificata('s',2,5)"> </font></center>

* * * * * * * * * *</td>

* * * * * * * *</tr>

* * * * * * * *<tr height="49">

* * * * * * * * * *<td width="84%" valign="top" bgcolor="white"

style="border-left: 1 solid #000080; border-right: 1 solid #000080;

border-bottom: 1 solid #000080" height="49"><font face="Arial"

size="2">strutturale


* * * * * * * * * * * *


* * * * * * * * * * * *</font></td>

* * * * * * * * * *<td width="16%" valign="top" bgcolor="white"

style="border-right: 1 solid #000080; border-bottom: 1 solid #000080"

height="49">

* * * * * * * * * * * *<center>

* * * * * * * * * * * * * *<font face="Arial" size="2"><input type="radio"

name="rispc" value="ON" onclick="dommodificata('s',3,5)"> </font></center>

* * * * * * * * * *</td>

* * * * * * * *</tr>

* * * * * * * *<tr height="49">

* * * * * * * * * *<td width="84%" valign="top" bgcolor="white"

style="border-left: 1 solid #000080; border-right: 1 solid #000080;

border-bottom: 1 solid #000080" height="49"><font face="Arial"

size="2">morfologica


* * * * * * * * * * * *


* * * * * * * * * * * *</font></td>

* * * * * * * * * *<td width="16%" valign="top" bgcolor="white"

style="border-right: 1 solid #000080; border-bottom: 1 solid #000080"

height="49">

* * * * * * * * * * * *<center>

* * * * * * * * * * * * * *<font face="Arial" size="2"><input type="radio"

name="rispd" value="ON" onclick="dommodificata('s',4,5)"> </font></center>

* * * * * * * * * *</td>

* * * * * * * *</tr>

* * * * * * * *<tr height="49">

* * * * * * * * * *<td width="84%" valign="top" bgcolor="white"

style="border-left: 1 solid #000080; border-right: 1 solid #000080;

border-bottom: 1 solid #000080" height="49"><font face="Arial"

size="2">nessuna delle precedenti


* * * * * * * * * * * *


* * * * * * * * * * * *</font></td>

* * * * * * * * * *<td width="16%" valign="top" bgcolor="white"

style="border-right: 1 solid #000080; border-bottom: 1 solid #000080"

height="49">

* * * * * * * * * * * *<center>

* * * * * * * * * * * * * *<font face="Arial" size="2"><input type="radio"

name="rispe" value="ON" onclick="dommodificata('s',5,5)"> </font></center>

* * * * * * * * * *</td>

* * * * * * * *</tr>

* * * * * * * *<input name="havanti" type="hidden"

value="domanda.asp?utente=..................."><input name="hindietro"

type="hidden"><input name="hiddom" type="hidden" value="243"><input

name="havantiv" type="hidden"

value="domanda.asp?utente=..................."><input name="hindietrov"

type="hidden" value="=fr"><input name="hmodificata" type="hidden"

value="no"><input name="huscita" type="hidden" value="no"><input

name="hstruscita" type="hidden"

value="domanda.asp?utente=..................."><input name="holdambito"

type="hidden" value="dl_02"><input name="hcolambito" type="hidden"

value="2"><input name="hstrtermina" type="hidden"

value="termina.asp?utente=........">

* * * * * * * *</form>

* * * * * *</table>

* * * * * *</p>

* * * *</center>

* * * *<center>

* * * * * *




* * * * * *</p>

* * * *</center>

* * * *<center>

* * * * * *



* * * * * *<table border="0" width="40%">

* * * * * * * *<tr>

* * * * * * * * * *<td width="25%"></td>

* * * * * * * * * *<td width="25%"></td>

* * * * * * * * * *<td width="25%">

* * * * * * * * * * * *<center>



* * * * * * * * * * Img/arr_bluedown1.gif (#)</center>



* * * * * * * * * *</td>

* * * * * * * * * *<td width="25%">

* * * * * * * * * * * *<center>

Img/avantiveloce.gif (#)

</center>

* * * * * * * * * *</td>

* * * * * * * *</tr>

* * * * * *</table>

* * * * * *</p>

* * * *</center>

* * * *<center>

* * * * * *



* * * * * *<table border="0" width="20%" cellspacing="0" cellpadding="3"

bordercolor="#000080" bgcolor="white">

* * * * * * * *<tr>

* * * * * * * * * *<td width="25%" bgcolor="white" onclick="uscita()"

style="cursor:pointer" <p align="center" > img/esci.gif

</td> </tr> </table> </center> </div> </body></td>

* * * * * * * *</tr>

* * * * * *</table>

* * * *</center>

* *</body>



</html>







************
la stringa per il tasto AVANTI (per procedere appunto di domada in domanda):
NON COMPARIVA NEPPURE la "manina" del cursore su link, ed il LINK per
procedere era INATTIVO:

era così:




<p align="center" onclick="inviaavantiv()" style='cursor:hand'>Img/avantiveloce.gif</p>



avendola modificata (come ho riportato sopra nel codice integrale:


Img/avantiveloce.gif (#)





...con questa modifica, mi visualizza la "manina"
sia su Explorer/mac sia su Netscape/mac


---> Risolto questo resta il problema più grosso:
cioè il gfatto che i link NON funzionano !!!

I codici modificati li ho provato offline sui vari browsers
win/mac(ovviamente i link, che sono rimandano a un db su piattaforma asp,
non rispondono;
--> sui browsers WIN linkano ad una pagina non trovata...ma linkano!
--> mentre sui browsers/mac NON linkano affatto....


CHE DEVO FARE ???
Devo trovare un mdo per rendere compatibile la gestione Eventi javascript
sia su browser/win che /mac?
mi potete aiutare?

Grazie

----------

x i MODERTORI:
per cortesia CANCELLATE il pecedente Topic con il titolo identico a questo...l'avevo postato senza fare Login...
questo è quello giusto.
Grazie[/b]

Kid A
21-03-2003, 17.49.13
:roll:
qualcuno mi sa aiutare ?

Kibi
21-03-2003, 19.34.23
con Mozilla su pc funziona?

Kid A
22-03-2003, 14.36.01
Mozilla non so...

il problema è Netscape 6x e + (su Win)

e IE 5x oltre a NN 7 su Mac !!!