in reply to CGI ... newbie

and returns : "No head/html tags, nowhere to insert. Returning javascript anyway" how can i overcome this problem ? what is the cause of it ? thank you

Here is how you figure it out, you add

print "File ", __FILE__, " at line ", __LINE__, " calling build_html \ +n";
and you watch to see where this diagnostic message shows up.