I have the same query as.
Pass a JSP variable as parameter to javascript function
However, If i use onclick="pagetype('<%=uname%>');
i'm getting illegal start of type error. Please help to fix this.
Yes.. <%@ page contentType= "text/html" pageEncoding="UTF-8" %>