Dear frinds I have a submit button and Link in a JSP. If I click on the Submit button , it will validatev the data with validation framework. and if data is fine , it will insert/update the data. and go next page ...thats fine I have a link ( Next>> in the same JSp page. The user can either click on Submit button or on this link to go second page. So, when I click on the Link , it shoudl do teh same process, whatever teh submit button is doing.. means, it should submit teh form, validate the data with validaton framewor, and call teh action class, and insert the data.. I tried with java ascrtipt , but its not weorking peoperly.. Canany throwe some light on this..
Joined: Jan 30, 2001
Click of a link is not equivalent to submitting a button. When you click a submit button, the request gets sent to the RP as a submit request and the RP knows that if validation is turned on, it should run thru the Validation fwk and take the necc steps but when you click on a link, all the RP does is to forward it to the right action. I am sure that upon the click of the link, the Action is getting called, just that the step of the validation fwk is getting skipped. If you really wanna use the link to submit the form, what you should do is call the submit method of the form on the onclick event of the link. That will solve all problems for you. HTH Sahil