Ciao a tutti.

Mi han detto che questa pagina potrebbe avere dei problemi di esecuzione del codice javascript su Internet Explorer 9. Io non credo sia questo il problema, ma quando si preme il bottone "accedi" (occorre una password di 8 lettere) sembra che la pagina si blocchi e non avvenga nulla. I link originali sono stati sostituiti con link a google, tanto per il test non cambia nulla.

Qualcuno può provare a copiarsi il codice in locale e verificare che su IE9 il bottone "accedi" rimandi alla pagina di "Google Immagini"? Se qualcuno me ne da conferma, escludo che il problema sia del javascript e sono contento.
Se invece non funziona chiedo che mi diano un IE9 per poterci lavorare...

codice:
<html>
<head>
<title>Identificazione</title>

<script>
<!-- Hide Script

if (top.location != self.location) {

top.location = self.location

}

//End Hide Script-->

</script>
</head>

 <body onLoad="document.forms[0].userid.focus();">

<form name="formauth" method="POST" action="http://www.google.it" onSubmit="return submitForm()">

<table width='300' cellspacing="0" cellpadding="2" align="center">
	<tr>
		<td>
			<table width='100%' cellspacing="0" cellpadding="2">
				<tr>
					<td height="10"></td>
				</tr>
				<tr>
					<td>
						<table width='100%' cellspacing="0" cellpadding="2">
							<tr>
								<td>Login :</td>
								<td align="right"><input type="text" name="userid" size="20"></td>
							</tr>
							<tr>
								<td>Password(*) :</td>
								<td align="right"><input type="password" name="password" size="20"></td>
							</tr>
							<tr>
								<td></td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td align="right">
						<input type="button" name="changepwd" value="Cambia Password" onclick="return changePwdForm()">
						<INPUT type="submit" name="ok" value="Accedi">
					</td>
				</tr>
			</table>

			<tr>
				<td><font size="1" face="Verdana"> (*) la password deve essere di 8 caratteri. </font></td>
			</tr>
</table>

</form>

 

<script type="text/javascript">
	function IsEnter(e)
	{
		if (checkEnter(e))
		{
			submitForm();
		}
	}
	
	// verfica che il singolo valore immesso sia Enter
	function checkEnter(e) 
	{
		var charCode = e.keyCode
		if (charCode != 13)
			return false
		else
			return true
	}
	
	function changePwdForm(){
		document.formauth.ok.disabled=true;
		document.formauth.changepwd.disabled=true;
		document.formauth.submit();
	}

	function submitForm()
	{
		if (document.formauth.userid.value!="" && document.formauth.password.value!="") 
		{
			if(document.formauth.password.value.length!=8 && document.formauth.password.value.toLowerCase() != "init" )
			{
				alert ("La Password deve essere di 8 cifre");
				return false;
			}
			document.formauth.action="https://www.google.it/imghp?hl=it&tab=wi";
			document.formauth.method="GET";
			document.formauth.ok.disabled=true;
			document.formauth.changepwd.disabled=true;
		} 
		else
		{
			alert ("Inserire codice Cliente e Password");
			return false;
		}
	}
</script>

</body>

</html>
Si, lo so che la pagina in se fa abbastanza schifo... ma se funziona, così è e così resta. Pace.