Hi, Thanks. My problem is solved One more doubt. In my test.jsp page I have few bottons Back,Next and Finish When i click on Next it should disply next question. Can I call jsp method for onclick event? where i forward it to NextQue servlet it fetches next question <INPUT TYPE = "BUTTON" NAME ="Back" VALUE ="Back " onclick = 'Backmtd(this)' > <%! public void Backmtd() { %> <jsp:forward page="/servlet/NextQue" /> <%! } %> I tried like this .it's not working. I am confussed... please help me out. thanks, padmashree
Hi, Jsp:forward will run in server side. but the general function will execute in client side. so i think you can't use javascript function for JSP work. let me know if you have any other points. -Prakash
Even I addressed the same problem . But now i have solved it. Call a Java script function onclick event. say refreshmethod() is the Java script method which is called on clicking the button In a JSP page <script language="JavaScript"> function refreshmethod() { window.location="/refresh.jsp"; } </script> <body> <input type=button onClick="refreshmethod()" ></input> </body>
Please note that The Java Ranch has a naming policy, described here and "maheshe" is not a valid name. Please choose one which meets the requirements. Thanks.