• 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
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

error information using javascript

 
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I'am using struts to build a web application. However I need to do client side validation. I'am using the validator framework which brings up pop ups. However is there anyway using javascript that instead of pop-ups I can print the validation errors on the jsp page.

FOR EXAMPLE



after validation..

 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You may want to look into fValidate.

I not a struts person so I would not know how to use the server side validation and make it appear beside it.

Eric
 
Pranav Sharma
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was actually looking only at client side validation. Sorry if i was not clear
 
Pranav Sharma
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Eric

I looked at fvalidate. But when I try to insert i get a simple validation, it gives me an script error of "Object Expected"

Below is my jsp
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you including the script on the page?
 
Pranav Sharma
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I had the file included, but did not set the parameter right. Thanks for the prompt reply anyways.
Also what would you recommend I read, so i dont stay an javascript illiterate. I see you are an author, is the book good for a beginner
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The book covers the basic concepts in JavaScript giving each topic 1 to 2 pages on it. It starts out basic and advances to more advanced topics as the book progresses.

Wiley has a sample chapter: here, I think it is on event handlers if I remember correctly. There should be code in all of the blue boxes, not sure if they fixed that problem with the pdf.

Eric
 
Onion rings are vegetable donuts. Taste this tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic