Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Subit the form with html:link

Ranch Hand
Posts: 325
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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..
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic