Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

danielvlopes

Minhas funçoes Js não funcionam no FireFOX nem a pal.

Recommended Posts

Estou usando alguns código Js no meu site mas só funciona no IE, alguem poderia me dizer o porque?

Muito obrigado, o cóidgo está abaixo:

 

// JavaScript Documentfunction MM_reloadPage(init) {  //reloads the window if Nav4 resized  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {	document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();}MM_reloadPage(true);//#####################MENU##############################	function menuMouseOver(image)		{		  src="";		  src = document.getElementById(image).src;		  src = src.substring(src.length-4,length);		  src = src+"over.jpg";		  document.getElementById(image).src = src;		}		function menuMouseOut(image)		{		  src="";		  src = document.getElementById(image).src;		  src = src.substring(src.length-8,length)+".jpg";		  document.getElementById(image).src = src;		  		}//#####################CONTACT US#########################	function valida()	{		conf="";		 		if((document.getElementById("firstname").value=="") || (document.getElementById("firstname").value.substring(0,1)==" "))		{			conf=conf+"\n- FIRST NAME is a required field!";		}				if((document.getElementById("lastname").value=="") || (document.getElementById("lastname").value.substring(0,1)==" "))		{			conf=conf+"\n- LAST NAME is a required field!";		}					if((document.getElementById("telephone").value=="") || (document.getElementById("telephone").value.substring(0,1)==" "))		{			conf=conf+"\n- TELEPHONE is a required field!";		}								email   = document.getElementById("email").value;		apos	= email.indexOf("@")		pontopos= email.lastIndexOf(".")					  if (apos<1||pontopos-apos<2) 			{				conf=conf+"\n- This is not valid email!";			}				if((document.getElementById("address").value=="") || (document.getElementById("address").value.substring(0,1)==" "))		{			conf=conf+"\n- ADDRESS is a required field!";		}				if (conf!="") 		{			alert(conf); 			conf="";			  return false;		}		else 		{			alert("Your message has been sent successfully.");		}	}

E no html chamo este script usando:

<head>	<script type="text/javascript" src="templates/stagesound.js"></script>	</head>

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.