Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts Validator Framework: client-side problem with submitting buttons

 
Michele Giunti
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I'm using Struts Validator Framework (Struts 1.3).
Server-side validation works well.
The problem is in client-side validation.

The form name I have to validate is: RegistrazioneUtenteForm.

In my jsp page I have 2 buttons:
1)
2)
and the following form declaration:

Moreover I have enabled javascript validation:


The javascript function submitRegistrazioneUtenteForm is the following:


If I click on the second button (html:submit), all works well (I get javascript alerts).
If I click on the first button (html:link), the form is submitted but I can't see any javascript alerts.

I can't understand where is the problem.

Can you help me?

Thanks in advance.

PS: I have underscored the javascript e_v_a_l function only to be allowed to post in this forum. In my code, it's not underscored.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not entirely sure, but I suspect the problem may be with the fact that you're using an eval to submit the form. I'd suggest you try doing a normal JavaScript submit without the eval.
 
Michele Giunti
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried your suggestion with:

but the result is the same. The form is submitted but I can't see any javascript alerts.

I can't understand where is the problem.

Suggestions?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic