the code where i am finding a problem is as follows:
Expand|Select|Wrap|Line Numbers
- <html>
- <head>
- <script>
- function fun1(){
- window.document.formName.action="/someServlet";
- window.document.formName.submit();
- }
- </script>
- </head>
- <body>
- <form name="formName" action = "/ab.jsp" method ="post">
- <a href="#" onClick="fun1();" >Some Link</a>
- </form></body>
- </html>
The problem here is when i click on the hyperLink it goes to the onClick method and from there the action is set to be redirected to a servlet(even when action was set to a jsp it didnt work), but it doesnt call the submit() method after that,...
Why is this so???
Plz do clarify the doubt....