• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
  • Tim Holloway
  • Carey Brown
  • salvin francis

javascript with struts and jsp..

Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all!
here is my question...
in my register.jsp page i have some selects and i would like to check that the user cannot select the same value in more than one in those selects.

therefore i use a javascript function and i then say onclick to execute myFunction().(it is a simple submit button and not html: submit)but my problem is that i would like javascript function when checks that there is a duplicate entry to show a message in the jsp and then let the user to change his entry.

what i have achieved is to check the entries,then show a message but right after that the control takes the Action and due to the duplicate entry an error is returned.user doesnt have the chance to change his entry!how can this be done??
any help appreciated!
Ranch Hand
Posts: 1490
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why don't use Validator instead of JavaScript for Client validation ?
He's dead Jim. Grab his tricorder. I'll get his wallet and this tiny ad:
professionally read, modify and write PDF files from Java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!