Gossamer Forum
Home : Products : Gossamer Forum : Testing Forum :

Netscape and Javascript

Quote Reply
Netscape and Javascript
Hallo everybody!!!! Can you please help me with this script??
It works with Internet Explorer but not with Netscape and I need it to work with it.

---------------------------------------------------------------------------

<FORM METHOD="POST" name="myForm" ACTION="visualizzaprodotti.asp?tipoprodotto=<%=tipoprodotto%>">
<div align="center">
<script>

<!-- // oroginal copyleft: xinod@libero.it -->
var IE, NN, GK, doc, sty, kkk
IE =(document.all) ? 1:0
NN =(document.layers) ? 1:0
GK =(document.getElementById && !document.all) ? 1:0

if(IE){
doc="document.all['"
sty="'].style"
}
if(NN){
doc="document.layers['"
sty="']"
}
if(GK){
doc="document.getElementById('"
sty="').style"
}

function showhide(num) {
kkk=eval(doc+num+sty);
if (NN){
if (kkk.visibility=='hide') kkk.visibility='show'
else kkk.visibility='hide'}
else {
if (kkk.visibility=='hidden') kkk.visibility='visible'
else kkk.visibility='hidden'}
}
function showF(num) {
kkk=eval(doc+num+sty);
if (NN) { kkk.visibility='show' } else { kkk.visibility='visible' };
}
function hideF(num) {
kkk=eval(doc+num+sty);
if (NN) { kkk.visibility='hide' } else { kkk.visibility='hidden' };
}

function sonch() {
if (myForm.colore[myForm.colore.selectedIndex].value=="Rosso") {
showF("tipo");
showF("scegli");
} else {
hideF("tipo");
hideF("scegli")} ;//}
(myForm.tipo[myForm.tipo.selectedIndex].value=="");}
</script>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
&nbsp;

<select size="1" name="colore" class="select" onchange="sonch();">
<option value="" selected>- - - - - - - - - -</option>
<option value="Giallo">Giallo</option>
<option value="Rosso">Rosso</option>
</select>
<BR>
<input type="text" name="scegli" value="tipo" style="border:0 none white;font-size:10pt; background='#FF0000' color:#000000; font-family:arial;" size=20>
<select size='1' name='tipo' class='select'>
<option value='' selected>- - - - - - - - - -</option>
<option value='Interno'>Interno</option>
<option value='Esterno'>Esterno</option>
</select></font>
</div>
</FORM>


many thanks!!!!!!
Girub