How to call javascript function in servlet

Status
Not open for further replies.

Dinesh03

Seniorius Lurkius
2
i was use alert box in jquery. i need to show that modal jquery alert box when record to stored successfully in database i can use this code for normal alert box.
out.println("alert('Project Name: "+project+" Added Successfully');");
out.println("location='AddProject.jsp';");
out.println("</script>");

but i need jqury modal alert box i have js and css file and it's works normal html page.
how to use this in servlet and show the alert message.

out.println("<link href=\"css/jquery.modal.css\" type=\"text/css\" rel=\"stylesheet\" />");
out.println("<script type=\"text/javascript\" src=\"js/jquery-latest.min.js\">");
out.println("<script type=\"text/javascript\" src=\"js/jquery.modal.min.js\">");
out.println("<script type=\"text/javascript\" src=\"js/jscript.js\">");
out.println("<script type=\"text/javascript\" src=\"js/success.js\">");
out.println("<script type=\"text/javascript\">");
response.getOutputStream().println("success();");
out.println("</script>");
any one tell me how to do this action.
 
Status
Not open for further replies.