hello, can u plz help me?? I can't run the javascript on Mozilla nad IE(can run on Chrome) I don't know why. I think my javascript has some problem. Here is my code .....

<script>
		function check()
		{
		if(document.getElementById("name").value==""||document.getElementById("address").value==""||document.getElementById("phone").value==""||document.getElementById("email").value==""||document.getElementById("username").value==""||document.getElementById("passwd").value==""||document.getElementById("passwd2").value==""){
		alert("You need to complete the form");
		}
		else continue;
		}
		
		function check_no()
		{
		var no=document.getElementById("phone").value;
		
		if(isNaN(no)==false){alert("right");}
		else {alert("Only number");}
		}
		
		function check_email(email,alerttxt)
			{
			with (email)
			  {
			  apos=value.indexOf("@");
			  dotpos=value.lastIndexOf(".com");
			  dotpos2=value.lastIndexOf(".net");
			  if (apos>1)
				{
				  if(dotpos-apos>1||dotpos2-apos>1){document.getElementById('email_error').style.visibility="hidden"; return true;}
				  else{document.getElementById('email_error').style.visibility="visible";}
				  }
			  else {document.getElementById('email_error').style.visibility="visible";}
			  }
			}
			
			function check_pass()
			{
			var first=document.getElementById("passwd").value;
			var second=document.getElementById("passwd2").value;
			if(first==second)continue;
			else {alert("Passwords do not match");document.getElementById("passwd").value="";document.getElementById("passwd2").value="";document.getElementById("passwd").select();}
			}
	</script>

Thz u for ur helps.

Member Avatar for rajarajan2017
function check()
		{
		if(document.getElementById("name").value==""
			||document.getElementById("address").value==""
			||document.getElementById("phone").value==""
			||document.getElementById("email").value==""
			||document.getElementById("username").value==""
			||document.getElementById("passwd").value==""
			||document.getElementById("passwd2").value==""){
			alert("You need to complete the form");
		}
		}

Remove elsepart with continue;

function check_pass()
			{
			var first=document.getElementById("passwd").value;
			var second=document.getElementById("passwd2").value;
			[B]if(!(first==second)){alert("Passwords do not match");document.getElementById("passwd").value="";document.getElementById("passwd2").value="";document.getElementById("passwd").select();} [/B]
			}

Make the changes in the function like above here to removed the continue.

It's still incorrect. :(

It's still incorrect. :(

Member Avatar for diafol

Did you think of posting this in the JS forum?

Actually I used it in HTML file ... to check validation...

Member Avatar for diafol

Actually I used it in HTML file ... to check validation...

Of course, but it's still a js issue. You may get more js experts in the js forum.

Thanks for sharing knowledge.

commented: You should die a horrible death for sig spamming -1
Member Avatar for diafol

Thai spy with my little eye a spammer beginning with servertoday. Shameless. Go clog up another site.

Thz u all I'll move this to JS forum ....

hi, i need help concerning js is there anybody that can help?

Member Avatar for diafol

>hi, i need help concerning js is there anybody that can help?

Go - to - the - JS - forum...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.