I need to run some client script before (or after) posting to a Servlet from a JSP page. Can this be done? I tried to include a javascript tag in a JSP page and it didn't load. Thanks in advance. -- Mike
If you want to run some js before submitting the page (say validation), you can implement the onSubmit function of the button that calls the page. Return true if you want the submit to occur and return false if you do not. If you want to run some js after the page has been returned by the server, implement the onLoad method of the <body> tag. The browser does not know and does not care if you use JSP, ASP, PHP or whatever else you can think of. If just gets content (usually HTML) back from the server and renders it. If you are using the <SCRIPT language='javascript'> tag and it is not working, verify the path of the file you specify is corrrect. That will also cause the problem.