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=" Κενό πεδίο";
wrongs++;
}
else
{
document.writeln("ola ok");
document.getElementById("wrong_"+field).innerHTML="";
}
}
}
}
}
when it goes to this command 'document.getElementById("wrong_"+temp).innerHTML=" Κενό πεδίο";' it stops and i can't find why. Can you please help me?
Thank you very much