Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Regarding JavaScript onChange validation

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear All...


Kindly, let me know how can I implement JavaScript in a JSF page ?

I have three input text fields, userid, Name, & E-mail id;
I need to implement JavaScript onChange validation, i.e
if the user inputs Characters in the userid input field & moves to next
input field, he should get the error message "User Id can't be characters".
without clicking the submit botton.

Similar validations for other input fields, name & e-mailid.

kindly, put the code.


Thank you in advance,
H.N. Azmi
 
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Javascript runs at the client side and intercepts on HTML only.
JSF runs at the server side and produces HTML output.

So when writing Javascript for JSF, you should ignore the JSF code and only concentrate on its HTML output. Open up a JSF page in your favourite webbrowser, view its page source and base your Javascript on it.
 
Hozaifa Azmi
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bauke Scholtz...

will you please post the JavaScript code for the above mentioned validations.
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, I will not. Hire a Javascript developer, or follow a Javascript course/book yourself, or try a Javascript forum where in you post the question the smart way.
 
Would you like to try a free sample? Today we are featuring tiny ads:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic