locked
Validating using Javascript RRS feed

  • Question

  • User-2036877890 posted
    Hello, I need assistance regarding client side validation using JavaScript.

    I have three ASP.net textboxes(ID, card num,ACC num), a user can either locate a client from the database by selecting only one field. When the focus is on the ID, two other textboxes must be disabled. And vice versa.

    When the user starts to type in the textbox, the other two must be disable. When the user deletes what they have typed in then the other textboxes must be enable. This must happen the first the page is loaded. I can only achieve this when the control losses focus using onchange event. Please share if you have any idea how to a accomplish this
    Sunday, June 3, 2018 2:07 PM

All replies

  • User36583972 posted


    Hi mphomakole,

    Hello, I need assistance regarding client side validation using JavaScript.

    I have three ASP.net textboxes(ID, card num,ACC num), a user can either locate a client from the database by selecting only one field. When the focus is on the ID, two other textboxes must be disabled. And vice versa.

    When the user starts to type in the textbox, the other two must be disable. When the user deletes what they have typed in then the other textboxes must be enable. This must happen the first the page is loaded. I can only achieve this when the control losses focus using onchange event. Please share if you have any idea how to a accomplish this

    Why you want validation using JavaScript? As a server control,the suitable way is detects it in the code behind.


    Best Regards,

    Yong Lu

    Monday, June 4, 2018 8:00 AM