Use single quotes.
error += '<li> this is not the name "....." </li>\n';
Or escape the double quotes.
error += "<li> this is not the name \".....\" </li>\n";
Use single quotes.
error += '<li> this is not the name "....." </li>\n';
Or escape the double quotes.
error += "<li> this is not the name \".....\" </li>\n";