Force Validation check

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

    #1

    Force Validation check

    Hi everyone,

    I am using a popup window to display a calander control.
    When the user select a date the date on the main window
    is set to the selected date and the popup closes useing
    javascript.

    The problem is this bypasses the form validation on the
    main page and the error message is not dispalyed untill
    the form is submited. I need to be able to validate the
    date entered as soon as it is selected, and not wait till
    the form is submited.

    Does any one know how to raise an event on the main
    window when the value of one of its controls is set by
    its child.

    Thanks in advance

    Jake

    Cheers jake
  • Natty Gur

    #2
    Re: Force Validation check

    Jake Hi,

    If you will take a look at WebUiValidation .js (which holds the
    validation code) you can see that the validetor hook the onchange event.
    Try to call the onchange event of the control after you change its
    value.

    Natty Gur, CTO
    Dao2Com Ltd.
    34th Elkalay st. Raanana
    Israel , 43000
    Phone Numbers:
    Office: +972-(0)9-7740261
    Fax: +972-(0)9-7740261
    Mobile: +972-(0)58-888377


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!

    Comment

    • Jake

      #3
      Re: Force Validation check

      Natty,

      Thanks for your feedback. I have implemented your
      suggestion of useing the ValidatorValida te() method of
      the .js file and it works fine.

      The only limitation I have now is i dont know how to
      reference the function from the popup. I can only call
      it from the parent useing:

      onClick="javasc ript:ValidatorV alidate(vldComp FromDate);"

      Would you know how to call it from the child?

      I have tried the following and that didnt work:

      window.opener.V alidatorValidat e('vldCompFromD ate');

      Cheers Jake
      [color=blue]
      >-----Original Message-----
      >Jake Hi,
      >
      >If you will take a look at WebUiValidation .js (which[/color]
      holds the[color=blue]
      >validation code) you can see that the validetor hook the[/color]
      onchange event.[color=blue]
      >Try to call the onchange event of the control after you[/color]
      change its[color=blue]
      >value.
      >
      >Natty Gur, CTO
      >Dao2Com Ltd.
      >34th Elkalay st. Raanana
      >Israel , 43000
      >Phone Numbers:
      >Office: +972-(0)9-7740261
      >Fax: +972-(0)9-7740261
      >Mobile: +972-(0)58-888377
      >
      >
      >*** Sent via Developersdex http://www.developersdex.com[/color]
      ***[color=blue]
      >Don't just participate in USENET...get rewarded for it!
      >.
      >[/color]

      Comment

      • Jake

        #4
        Re: Force Validation check

        Natty,

        Thanks for your feedback. I have implemented your
        suggestion of useing the ValidatorValida te() method of
        the .js file and it works fine.

        The only limitation I have now is i dont know how to
        reference the function from the popup. I can only call
        it from the parent useing:

        onClick="javasc ript:ValidatorV alidate(vldComp FromDate);"

        Would you know how to call it from the child?

        I have tried the following and that didnt work:

        window.opener.V alidatorValidat e('vldCompFromD ate');

        Cheers Jake
        [color=blue]
        >-----Original Message-----
        >Jake Hi,
        >
        >If you will take a look at WebUiValidation .js (which[/color]
        holds the[color=blue]
        >validation code) you can see that the validetor hook the[/color]
        onchange event.[color=blue]
        >Try to call the onchange event of the control after you[/color]
        change its[color=blue]
        >value.
        >
        >Natty Gur, CTO
        >Dao2Com Ltd.
        >34th Elkalay st. Raanana
        >Israel , 43000
        >Phone Numbers:
        >Office: +972-(0)9-7740261
        >Fax: +972-(0)9-7740261
        >Mobile: +972-(0)58-888377
        >
        >
        >*** Sent via Developersdex http://www.developersdex.com[/color]
        ***[color=blue]
        >Don't just participate in USENET...get rewarded for it!
        >.
        >[/color]

        Comment

        Working...