Torna indietro   Hardware Upgrade Forum > Software > Programmazione

ASUS ROG Swift OLED PG34WCDN recensione: il primo QD-OLED RGB da 360 Hz
ASUS ROG Swift OLED PG34WCDN recensione: il primo QD-OLED RGB da 360 Hz
ASUS ROG Swift OLED PG34WCDN è il primo monitor gaming con pannello QD-OLED Gen 5 a layout RGB Stripe Pixel e 360 Hz su 34 pollici: lo abbiamo misurato con sonde colorimetriche e NVIDIA LDAT. Ecco tutti i dati
Recensione Nothing Phone (4a) Pro: finalmente in alluminio, ma dal design sempre unico
Recensione Nothing Phone (4a) Pro: finalmente in alluminio, ma dal design sempre unico
Nothing Phone (4a) Pro cambia pelle: l'alluminio unibody sostituisce la trasparenza integrale, portando una solidità inedita. Sotto il cofano troviamo uno Snapdragon 7 Gen 4 che spinge forte, mentre il display è quasi da top dig amma. Con un teleobiettivo 3.5x e la Glyph Matrix evoluta, è la prova di maturità di Carl Pei. C'è qualche compromesso, ma a 499EUR la sostanza hardware e la sua unicità lo rendono un buon "flagship killer" in salsa 2026
WoW: Midnight, Blizzard mette il primo, storico mattone per l'housing e molto altro
WoW: Midnight, Blizzard mette il primo, storico mattone per l'housing e molto altro
Con Midnight, Blizzard tenta il colpaccio: il player housing sbarca finalmente su Azeroth insieme a una Quel'Thalas ricostruita da zero. Tra il dramma della famiglia Ventolesto e il nuovo Prey System, ecco com'è la nuova espansione di World of Warcraft
Tutti gli articoli Tutte le news

Vai al Forum
Rispondi
 
Strumenti
Old 16-10-2008, 18:43   #1
UnknownSoldier
Member
 
Iscritto dal: Aug 2008
Messaggi: 210
[JavaScript] Problema con IE 6

Salve a tutti. Ho notato una stranissima anomalia nel comportamento di IE 6 durante l'esecuzione di un mio script JavaScript. Mozilla Firefox riesce correttamente nell'esecuzione senza nessun messaggio di errore nella console. Con IE 6 invece, lo script si arresta e viene visualizzato il seguente messaggio: http://img50.imageshack.us/img50/6272/screen3qq7.png
Allora, ho fatto Visualizza - HTML, ho copiato il codice e l'ho incollato in Notepad++ e ho visto cosa c'è alla riga 40, c'è questo: nick = document.getElementById ("nick");

L'input text ha ovviamente dichiarato l'id "nick", e infatti Mozilla lo esegue correttamente. La cosa che mi fa imbestialire è: perchè IE 6 fa così? Eppure si tratta di una operazione elementare... vi prego aiutatemi
Questo è il codice completo (quello statico preso da IE), se può aiutarvi:

Codice:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>Dieffe web - Home</title>
		<meta http-equiv="content-type" content="text/html;charset=windows-1252">
		<link rel = "stylesheet" type = "text/css" href = "style.css">
	</head>
	<body>
		<script type = "text/javascript" src = "../jslib.js"></script>
<script type = "text/javascript">
	//<!--
			function showLoginForm()
		{
			blackdiv = document.getElementById ("black");
			blackdiv.style.visibility = "visible";
			
			logindiv = document.getElementById ("login");
			logindiv.style.visibility = "visible";
		}
		
		function hideLoginForm()
		{
			blackdiv = document.getElementById ("black");
			blackdiv.style.visibility = "hidden";
			
			logindiv = document.getElementById ("login");
			logindiv.style.visibility = "hidden";
			
			nick = document.getElementById ("nick");
			password = document.getElementById ("password");
			loginmessage = document.getElementById ("loginmessage");
			
			nick.value = "";
			password.value = "";
			loginmessage.innerHTML = "";
		}
		
		function sendLoginForm()
		{
			nick = document.getElementById ("nick");
			password = document.getElementById ("password");
			loginmessage = document.getElementById ("loginmessage");
			
			if (nick.value != "" && password.value != "")
			{
				request = createXMLHttpRequest
				(
					function()
					{
						if (request.readyState == 4 && request.status == 200)
						{
							response = request.responseText;
							if (response == "success")
								window.location.reload();
							else
								loginmessage.innerHTML = response;
						}
					}
				);
				request.open ("get", "../database/login.php?r=" + Math.random() * 10 + "&nick=" + nick.value + "&pwd=" + password.value + "&lang=it");
				request.send (null);
			}
			else
				loginmessage.innerHTML = "Empty fields";
		}
		
		function showSignupForm()
		{
			blackdiv = document.getElementById ("black");
			blackdiv.style.visibility = "visible";
			
			signupdiv = document.getElementById ("signup");
			signupdiv.style.visibility = "visible";
		}
		
		function hideSignupForm()
		{
			blackdiv = document.getElementById ("black");
			blackdiv.style.visibility = "hidden";
			
			logindiv = document.getElementById ("signup");
			logindiv.style.visibility = "hidden";

			nickfield = document.getElementById ("nickfield");
			emailfield = document.getElementById ("emailfield");
			signupmessage = document.getElementById ("signupmessage");
			
			nickfield.value = "";
			emailfield.value = "";
			signupmessage.innerHTML = "";
		}
		
		function sendSignupForm()
		{
			nickfield = document.getElementById ("nickfield");
			radio1 = document.getElementById ("radio1");
			radio2 = document.getElementById ("radio2");
			emailfield = document.getElementById ("emailfield");
			signupmessage = document.getElementById ("signupmessage");
			
			var pemail;
			if (radio1.checked)
				pemail = "y";
			else if (radio2.checked)
				pemail = "n";
			
			next = true;
			if (nickfield.value == "")
			{
				signupmessage.innerHTML = "Nick field is empty";
				next = false;
			}		
			else if (emailfield.value == "")
			{
				signupmessage.innerHTML = "E-mail field is empty";
				next = false;
			}
			
			if (next)
			{
				request = createXMLHttpRequest
				(
					function()
					{
						if (request.readyState == 4 && request.status == 200)
						{
							response = request.responseText;
							if (response == "success")
								location.href = "registration.php";
							else
								signupmessage.innerHTML = response;
						}
					}
				);
				request.open ("get", "../database/registration.php?r=" + Math.random() * 10 + "&nick=" + nickfield.value
				+ "&email=" + emailfield.value + "&pemail=" + pemail + "&lang=it");
				request.send (null);
			}
		}
		//-->
</script>
<div id = "black">
</div>
<div id = "maindiv">
			<div id = "login">
			<p style = "text-align: right; margin: 3px;"><a href = "#" onClick = "hideLoginForm(); return false;"><img src = "images/x.png" alt = "Close" border = "0"></a></p>
			<p style = "font-weight: bold; font-size: 15px;">Accedi</p>
			<div style = "width: 220px; margin: auto;">
				<table>
					<tr>
						<td>Nick:</td><td><input type = "text" id = "nick" maxlength = "20"></td>
					</tr>
					<tr>
						<td>Password:</td><td><input type = "password" id = "password" maxlength = "25"></td>
					</tr>
					<tr>
						<td></td><td><input type = "submit" value = "Accedi" onClick = "sendLoginForm(); return false;"></td>
					</tr>
				</table>
				<div id = "loginmessage" style = "text-align: center; font-size: 10px; color: red;"></div>
			</div>
		</div>
		<div id = "signup">
			<p style = "text-align: right; margin: 3px;"><a href = "#" onClick = "hideSignupForm(); return false;"><img src = "images/x.png" alt = "Close" border = "0"></a></p>
			<p style = "font-weight: bold; font-size: 15px;">Registrati</p>
			<div style = "width: 240px; margin: auto;">
				<table>
					<tr>
						<td>Nick:</td><td><input type = "text" id = "nickfield" maxlength = "20"></td>
					</tr>
					<tr>
						<td>E-mail:</td><td><input type = "text" id = "emailfield" maxlength = "50"></td>
					</tr>
					<tr>
						<td>E-mail privata:</td><td><input type = "radio" id = "radio1" name = "radio"><label for = "radio1">Yes</label><input type = "radio" id = "radio2" name = "radio" checked = "checked"><label for = "radio2">No</label></td>
					</tr>
					<tr>
						<td></td><td><input type = "submit" value = "Registrati" onClick = "sendSignupForm(); return false;"></td>
					</tr>
				</table>
				<div id = "signupmessage" style = "text-align: center; font-size: 10px; color: red;"></div>
			</div>
		</div>

		<div style = "width: 600px; float: left; text-align: left; margin: 2px 10px 0px 6px;">
			<a href = "#" onClick = "showLoginForm(); return false;">Accedi</a> <span style = "font-size: 14px;">|</span> 
			<a href = "#" onClick = "showSignupForm(); return false;">Registrati</a>
		</div>
		<div style = "width: 135px; float: left; text-align: right; margin: 5px 0px 0px 0px;">
		<a href = "../en"><img src = "images/enflag.png" alt = "english" border = "0"></a>&nbsp;&nbsp;
		<a href = "../it"><img src = "images/itflag.png" alt = "italiano" border = "0"></a>
	</div>
	<p style = "margin-top: 0px;"><img src = "images/dieffeweb.png" alt = "Dieffe web"></p>
	<div id = "menudiv">		
		<div id = "menubuttons">
			<div style = "width: 720px; margin-left: auto; margin-right: auto;"><a href = "index.php">Home</a><a href = "software.php">Software</a><a href = "jitchat.php">J-it Chat</a><a href = "websites.php">Siti web</a><a href = "contact.php">Contatti</a></div>
		</div>
		<div style = "clear:both;"></div>
	</div>
</div>	
		<div id = "bodydiv">
			<div id = "text">
				<p style = "font-weight: bold; font-size: 15px;">Benvenuto su Dieffe web .com</p>
				<div>
				<script type="text/javascript"><!--
				google_ad_client = "pub-7051746397843508";
		/* 728x90, creato 01/05/08 */
				google_ad_slot = "0681514957";
		google_ad_width = 728;
		google_ad_height = 90;
//-->
				</script>
				<script type="text/javascript"
				src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
				</script>
				</div>
				<div style = "text-align: center; width: 520px; margin-right: auto; margin-left: auto;">
					<a href = "jitchat.php"><img src = "images/downloadChat.png" alt = "Download chat" border = "0" style = "float:left;"></a>
					<a href = "websites.php"><img src = "images/creationSites.png" alt = "Creation Sites" border = "0" style = "float:left; margin-left:6px;"></a>
					<div style = "clear:both;"></div>
				</div>
				<div style = "clear:both;"></div>
			</div>
		</div>
	</body>
</html>
UnknownSoldier è offline   Rispondi citando il messaggio o parte di esso
Old 16-10-2008, 21:49   #2
UnknownSoldier
Member
 
Iscritto dal: Aug 2008
Messaggi: 210
Scoperto l'arcano mistero: per IE 6 è un errore di sintassi usare getElementById() senza dichiarare prima la variabile utilizzando "var"
UnknownSoldier è offline   Rispondi citando il messaggio o parte di esso
 Rispondi


ASUS ROG Swift OLED PG34WCDN recensione: il primo QD-OLED RGB da 360 Hz ASUS ROG Swift OLED PG34WCDN recensione: il prim...
Recensione Nothing Phone (4a) Pro: finalmente in alluminio, ma dal design sempre unico Recensione Nothing Phone (4a) Pro: finalmente in...
WoW: Midnight, Blizzard mette il primo, storico mattone per l'housing e molto altro WoW: Midnight, Blizzard mette il primo, storico ...
Ecovacs Goat O1200 LiDAR Pro: la prova del robot tagliaerba con tagliabordi integrato Ecovacs Goat O1200 LiDAR Pro: la prova del robot...
Recensione Samsung Galaxy S26+: sfida l'Ultra, ma ha senso di esistere? Recensione Samsung Galaxy S26+: sfida l'Ultra, m...
Secondo Elon Musk FSD è più...
Anche Cloudflare fissa il 2029 per la si...
Hacker sfruttano da mesi un bug segreto ...
ASUSTOR Lockerstor 24R Pro Gen2: 24 bay ...
Rigetti supera la soglia dei 100 qubit: ...
eFootball raggiunge il miliardo di downl...
Come provare OpenClaw facilmente grazie ...
Microsoft conferma: questo glitch dell'o...
Toyota bZ7: una berlina da oltre 5 metri...
Artemis II, le prime foto del lato nasco...
Sempre più pubblicità su YouTube: arriva...
Polestar fa +80% in Italia e tocca quota...
Il tuo Mac smette di connettersi a Inter...
La nuova alleanza Intel-Google ridefinis...
Energia troppo cara, regole da rivedere:...
Chromium
GPU-Z
OCCT
LibreOffice Portable
Opera One Portable
Opera One 106
CCleaner Portable
CCleaner Standard
Cpu-Z
Driver NVIDIA GeForce 546.65 WHQL
SmartFTP
Trillian
Google Chrome Portable
Google Chrome 120
VirtualBox
Tutti gli articoli Tutte le news Tutti i download

Strumenti

Regole
Non Puoi aprire nuove discussioni
Non Puoi rispondere ai messaggi
Non Puoi allegare file
Non Puoi modificare i tuoi messaggi

Il codice vB è On
Le Faccine sono On
Il codice [IMG] è On
Il codice HTML è Off
Vai al Forum


Tutti gli orari sono GMT +1. Ora sono le: 20:04.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Served by www3v