hi guys.. i am new here and also new at java programming but trying to learn. Recently we had to study servlets so was tinkering around it. While working i thought of using javascripts in it. But after trying everything i failed to invoke javascript. This is my code. Its highly rookie code but i am just learning.
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
PrintWriter yash = response.getWriter();
yash.println("<html>");
yash.println("<head>");
yash.println("<script type='text/javascript'>");
yash.println("function callMe()");
yash.println("{");
yash.println("alert'Hello';");
yash.println("}");
yash.println("</script></head>");
yash.println("<body>");
yash.println("<center><table border = '4'></center>");
yash.println("<form name = 'myform' action = '#' onSubmit = 'return callMe()'");
yash.println("<tr><td>HEllO</td></tr></br>");
yash.println("<tr><td>Enter Name<input type = 'text' name = 'tex'</td></tr>");
yash.println("<tr><td> </td><td><select name = 'list' size = '4' multiple = 'multiple'>"+"<option>Hi</option>"+"<option>Hello</option>"+"<option>Shut</option>"+"</select></td></tr>");
yash.println("<tr><td>Male<input type = 'checkbox' name = 'sex' value = 'Male'></td></tr>");
yash.println("<tr><td>Female<input type = 'checkbox' name = 'sex' value = 'Female'></td></tr>");
yash.println("<tr><td>ParthJr.<input type = 'checkbox' name = 'sex' value = 'ParthJr'></td></tr>");
yash.println("<tr><td> </td><td><input type = 'submit' value = 'Submit'></td></tr></br>");
yash.println("</form>");
yash.println("</table>");
yash.println("</body>");
yash.println("</html>");
i haven't imported any libraries except java.io. Please guys help me find out what the problem is.