Ciao a tutti!
Avrei bisogno di un aiuto..
Sto creando 2-3 semplici paginette in HTML..
Ho fatto una homepage con 2-3 ComboBox... All'interno ci sono dei nomi, e io vorrei che quando seleziono un elemento da questo menu a tendina, mi si compia un azione, in questo caso si apra una pagina..
sono riuscito a farlo senza problemi per Explorer e per Opera, ma se apro Mozilla non funziona!
Ho fatto passare il sito per un Validatore online, e ho corretto gli errori, ma nulla...
posto il codice... non ho idea di come fare..
codice:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>TITOLO</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.Stile11 {font-size: 24px; font-family: Stereofidelic, monospace, fantasy;}
.Stile12 {
font-size: 15px;
font-family: "Berlin Sans FB";
}
.Stile14 {font-family: "Berlin Sans FB"}
#Select2
{
height: 21px;
width: 198px;
}
#Select1
{
height: 21px;
margin-bottom: 0px;
width: 198px;
}
#Text1
{
width: 65px;
}
.style1
{
width: 538px;
}
#Select3
{
width: 248px;
text-align: left;
}
.style3
{
font-family: Verdana;
color: #0000CC;
font-size: medium;
}
.style4
{
font-size: medium;
}
-->
</style>
<script language="JavaScript">
<!--
function FP_goToURL(url) {
window.location=url;
}
function Select1_onchange() {
if (Select1.value == "1") {FP_goToURL ('http://www.google.it');}
}
var data=new Date();
function Button1_onclick() {
Text1.value = Select1.value + Select2 .value;
var pagData = 'http://INDIRIZzO SITO/' + Text1 .value ;
xmlhttp = null;
if(window.XMLHttpRequest){ xmlhttp = new XMLHttpRequest();
}else if (window.ActiveXObject){
if (navigator.userAgent.toLowerCase().indexOf("msie 5") != -1) {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}else{ xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");}
}
vPage(pagData);
}
function vPage(pagData){
if(xmlhttp){
xmlhttp.open("HEAD",pagData,false);
xmlhttp.send(null);
if(xmlhttp.readyState==4){
if(xmlhttp.status==404){
giorno--
vPage(pagData);
}else{self.location.href=pagData;}}
}
}
function Select3_onclick() {
}
// -->
</script>
</head>
<body>
<table width="897" border="0" align="center" bordercolor="#FFFFFF">
<tr>
<td height="87" bordercolor="#FFFFFF" bgcolor="#FFFFFF" class="style1"><div align="left">[img]Images/logomsg3.gif[/img]
</div>
</td>
<td>
<font face="Verdana">
Tipologia
<select name ="select1" id="Select1" name="D1" onchange="return Select1_onchange()" onclick="return Select1_onclick()">
<option value = "0">A</option>
<option value = "1">B</option>
</select>
Provincia
<select id="Select2" name="D2" onclick="return Select2_onclick()">
<option value="0">VALORE 1</option>
<option value="1">VALORE 1</option>
</select> </font>
<p align="right" title="h">
<font face="Verdana"><input id="Button1" type="button" value="Ricerca veloce"
onclick="return Button1_onclick()" /><input id="Text1" type="text" /></font></p>
<p align="right" title="h" style="font-size: 6pt">
<font face="Verdana"> </font>
</p>
</td>
</tr>
</table>
<table width="897" border="0" align="center" bordercolor="#FFFFFF"
style="height: 376px">
<tr>
<td width="97" height="196" valign="top" bordercolor="#666666" bgcolor="#FFFFFF"></td>
<td width="765" height="312" rowspan="2">
<p align="center">
[img]Images/QUESTA%20FIGA.jpg[/img]</td>
<td width="765" height="312" rowspan="2"><p align="center">
[img]Images/ing_bags.jpg[/img]</p>
</td>
</tr>
<tr>
<td width="97" height="114" valign="top" bordercolor="#666666" bgcolor="#FFFFFF"></td>
</tr>
<tr>
<td height="91"></td>
<td colspan="2">
<p align="center">
[img]Images/entra.png[/img]<p
align="center" style="text-align: right">
<span class="style4"> </span><span class="style3"></span><select id="Select3" name="D3" onclick="return Select3_onclick()">
<option value="0">PROVA A</option>
<option value="1">PROVA B</option>
</select></td>
<td></td>
</tr>
</table>
</body>
</html>
ho creato queste 2 funzioncine per aprire il sito..
il tutto funziona su IE e Opera, ma non mozilla appunto...
a cosa può esser dovuto?