comparevalidators and javascript

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sramruttun

    #1

    comparevalidators and javascript

    hi

    I have 2 textboxes for entry of start and end dates. I allow typing in the
    textboxes also. I have 2 compareValidato r fields as well to validate the 2
    textboxes which work fine. Upon text change (onchange event) of the
    textboxes, I have written a javascript function (called formatDate) to
    format the date - that is, if the date is in format 1/1/2003, the function
    will format it to 01/01/2003.
    Normally, when the textboxes lose focus, the CompareValidato rs are executed
    automatically. I don't know whether the function is executed first (the one
    that I wrote on onchange event) or the compareValidato rs ?

    My question:
    I want to call the validators first then call the function i.e if the
    validation succeeds then I want to call the formatDate function and if the
    validation fails then don't call the formatDate function. Is this possible ?


Working...