Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

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: 1491
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why don't use Validator instead of JavaScript for Client validation ?
I'm full of tinier men! And a tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic