• 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

Check box (if checks) validation on text field

 
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,
In our page we have one check box and corresponding two text fields in a row. and many rows in a table.

if the user checked the box, then automatically the cursor should go to corresponding text field and do validation on that text field and i need to apply onblur event on that text field that we dont give the permission to move out from that filed until user fills correct value.

I can able to validate field with onblur and showing message field is required. but when I click on the check box the cursor is not moving to that field. how would I go directly to that field.

here is the following code.



Please suggest me on this, i want to go directly to the quantity field.

One more question: the above validation what I did is working under IE
 
Simpson Kumar
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One more question: the above validation what I did is working under IE but its not working properly in Mozilla, why? but I need to be validate the fields in any of the browser.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by sumant kuchipudi:
but its not working properly in Mozilla, why?


I assume you mean Firefox? What did Firebug show you?
 
Simpson Kumar
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Firebox is not showing anything, its just allowing to move out from the text box. where as in IE its not allowing to move out from that filed until fill correct value, the onblur event is working.


what about the above suggestion? how can I move directly to the text field if I click on the checkbox?
 
You got style baby! More than this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic