0

i am trying to find what is wrong with that but i can't find it

function check_form(formid)
{
	var field=document.getElementById(formid);
	var wrongs=0;
	document.write("lol");
	document.write(field.length);
	for (i=0;i<field.length;i++)
	{
		k=field[i];
		temp=k.name;
		document.write(temp);
		if (temp.indexOf('email')==0)
		{
			document.write("lalala email");
			if (check_mail(formid,temp)==true)
			{
				wrongs++;
				document.write(temp);
			}
		}
		else
		{
			
			if (temp.indexOf('til')==0)
			{
				document.write("lalala til");
				m=isValidPhone(formid,temp);
				if (m==true)
			    {
					document.write("Itan lathos");
					wrongs++;
					document.write(temp);
				}
				
			}
			else
			{
				
	           if (k.value=="")
	           {
		         
				  document.getElementById("wrong_"+temp).innerHTML="&nbsp;&nbsp;&nbsp;&nbsp;Κενό πεδίο";
		          
				  wrongs++;
	           }
 	           else
	           {
		            document.writeln("ola ok");
		            document.getElementById("wrong_"+field).innerHTML="";
	            }
			}
		}
	}
}

when it goes to this command 'document.getElementById("wrong_"+temp).innerHTML="&nbsp;&nbsp;&nbsp;&nbsp;Κενό πεδίο";' it stops and i can't find why. Can you please help me?
Thank you very much

2
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by pritaeas
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.