• 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 ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

error message.

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
In struts, i want to display an error message in message box by getting values from the actionform as if account number and the amount we deposited are same. Could you help me in doing this.
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you talking about doing a client-side validation before submitting a form or are you talking about loading a page and setting values on it?
 
pappitha swaminathan
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
after loading the page and setting values on it..
 
Joe Ess
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could set JavaScript variables with JSP tags so the error, if it exists, gets sent to the browser. Something like this (not tested, will probably need tweaking):

 
pappitha swaminathan
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Joe Ess wrote:You could set JavaScript variables with JSP tags so the error, if it exists, gets sent to the browser. Something like this (not tested, will probably need tweaking):




yeah i have also used the same.. instead of onload.. i have specified onsubmit.. it shows tag lib is not available... is der any issue of using onsubmit ???
 
Joe Ess
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

pappitha swaminathan wrote:
yeah i have also used the same.. instead of onload.. i have specified onsubmit.. it shows tag lib is not available... is der any issue of using onsubmit ???



I think we are talking about two different things. Per your previous response, I am talking about loading a page and based on the values loaded, displaying a dialog. I think you are talking about client-side validation of values the user puts on the page.
What shows "tag lib is not available"?
Why aren't you using the built-in Struts client-side validation?
 
pappitha swaminathan
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Joe Ess wrote:

pappitha swaminathan wrote:
yeah i have also used the same.. instead of onload.. i have specified onsubmit.. it shows tag lib is not available... is der any issue of using onsubmit ???



I think we are talking about two different things. Per your previous response, I am talking about loading a page and based on the values loaded, displaying a dialog. I think you are talking about client-side validation of values the user puts on the page.
What shows "tag lib is not available"?
Why aren't you using the built-in Struts client-side validation?




ya fine, i tried with the way you have given, its working good. thanks for your kind reply
 
Danger, 10,000 volts, very electic .... tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic