validate on blur ?

Discussion in 'ASP .Net' started by Kevin Spencer, Jun 28, 2004.

  1. There is indeed an "onblur" event for an input type="text" form field. What
    exactly do you want to know?

    --
    HTH,
    Kevin Spencer
    ..Net Developer
    Microsoft MVP
    Big things are made up
    of lots of little things.

    "z. f." <> wrote in message
    news:...
    > Hi,
    >
    > i have input type=text and i want to make validation on the onblur

    (lost
    > focus) event.
    >
    > i need to call some javascript function for validation with the control id

    ..
    >
    > is there something like that possible / documented?
    >
    > TIA, z.
    >
    >
    >
     
    Kevin Spencer, Jun 28, 2004
    #1
    1. Advertising

  2. For client side validation, this would be easy. To mix into the current .NET
    framework validation is trickier (most likely subclass the validator with
    custom script). There are events to put out JavaScript, but it is not as
    easy as just dropping a control and setting properties.

    There are support articles on setting focus, which can be used to work your
    validation:
    http://support.microsoft.com/default.aspx?scid=kb;en-us;316719
    http://support.microsoft.com/default.aspx?scid=kb;en-us;816166

    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA

    ************************************************
    Think Outside the Box!
    ************************************************
    "z. f." <> wrote in message
    news:...
    > Hi,
    >
    > i have input type=text and i want to make validation on the onblur

    (lost
    > focus) event.
    >
    > i need to call some javascript function for validation with the control id

    ..
    >
    > is there something like that possible / documented?
    >
    > TIA, z.
    >
    >
    >
     
    Cowboy \(Gregory A. Beamer\) [MVP], Jun 28, 2004
    #2
    1. Advertising

  3. Kevin Spencer

    z. f. Guest

    Hi,

    i have input type=text and i want to make validation on the onblur (lost
    focus) event.

    i need to call some javascript function for validation with the control id .

    is there something like that possible / documented?

    TIA, z.
     
    z. f., Jun 28, 2004
    #3
  4. Kevin Spencer

    Rigs Guest

    If you want to execute javascript on the client, add this to your page_load:

    'With <name of text box here>

    '.Attributes.Add("onBlue", "<JavaScript Function Name ()>")

    'End With

    Within the <head> tag of your .aspx page, create your fuction to execute for
    the onBlur event.
    Thanks,
    -Rigs

    PS for Server side validation, I would use a Custom Validation control to
    call a page behind sub or function.



    "z. f." <> wrote in message
    news:...
    > Hi,
    >
    > i have input type=text and i want to make validation on the onblur

    (lost
    > focus) event.
    >
    > i need to call some javascript function for validation with the control id

    ..
    >
    > is there something like that possible / documented?
    >
    > TIA, z.
    >
    >
    >
     
    Rigs, Jun 28, 2004
    #4
  5. Kevin Spencer

    Rigs Guest

    NOTE: Please remove the " ' " (apostrophes) from code. They were
    accidently left in.
    -Rigs

    "Rigs" <> wrote in message
    news:...
    > If you want to execute javascript on the client, add this to your

    page_load:
    >
    > 'With <name of text box here>
    >
    > '.Attributes.Add("onBlue", "<JavaScript Function Name ()>")
    >
    > 'End With
    >
    > Within the <head> tag of your .aspx page, create your fuction to execute

    for
    > the onBlur event.
    > Thanks,
    > -Rigs
    >
    > PS for Server side validation, I would use a Custom Validation control to
    > call a page behind sub or function.
    >
    >
    >
    > "z. f." <> wrote in message
    > news:...
    > > Hi,
    > >
    > > i have input type=text and i want to make validation on the onblur

    > (lost
    > > focus) event.
    > >
    > > i need to call some javascript function for validation with the control

    id
    > .
    > >
    > > is there something like that possible / documented?
    > >
    > > TIA, z.
    > >
    > >
    > >

    >
    >
     
    Rigs, Jun 28, 2004
    #5
  6. Kevin Spencer

    z. f. Guest

    sorry i'll make myself more clear:

    i'm using a dot net validator, the validator validates the input upon
    submit.
    i want to call some javascript method, so the validator make validation when
    i call it.
    is this possible?


    "Kevin Spencer" <> wrote in message
    news:...
    > There is indeed an "onblur" event for an input type="text" form field.

    What
    > exactly do you want to know?
    >
    > --
    > HTH,
    > Kevin Spencer
    > .Net Developer
    > Microsoft MVP
    > Big things are made up
    > of lots of little things.
    >
    > "z. f." <> wrote in message
    > news:...
    > > Hi,
    > >
    > > i have input type=text and i want to make validation on the onblur

    > (lost
    > > focus) event.
    > >
    > > i need to call some javascript function for validation with the control

    id
    > .
    > >
    > > is there something like that possible / documented?
    > >
    > > TIA, z.
    > >
    > >
    > >

    >
    >
     
    z. f., Jun 29, 2004
    #6
  7. That I don't know. ASP.Net validator classes are designed to work a certain
    way. I do my own custom validation, so I'm not as familiar with them as I
    ought to be. However, I am reasonably sure that if an ASP.Net validator
    Control doesn't do what you want, you could certainly write one that does.

    --
    HTH,
    Kevin Spencer
    ..Net Developer
    Microsoft MVP
    Big things are made up
    of lots of little things.

    "z. f." <> wrote in message
    news:...
    > sorry i'll make myself more clear:
    >
    > i'm using a dot net validator, the validator validates the input upon
    > submit.
    > i want to call some javascript method, so the validator make validation

    when
    > i call it.
    > is this possible?
    >
    >
    > "Kevin Spencer" <> wrote in message
    > news:...
    > > There is indeed an "onblur" event for an input type="text" form field.

    > What
    > > exactly do you want to know?
    > >
    > > --
    > > HTH,
    > > Kevin Spencer
    > > .Net Developer
    > > Microsoft MVP
    > > Big things are made up
    > > of lots of little things.
    > >
    > > "z. f." <> wrote in message
    > > news:...
    > > > Hi,
    > > >
    > > > i have input type=text and i want to make validation on the onblur

    > > (lost
    > > > focus) event.
    > > >
    > > > i need to call some javascript function for validation with the

    control
    > id
    > > .
    > > >
    > > > is there something like that possible / documented?
    > > >
    > > > TIA, z.
    > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    Kevin Spencer, Jun 29, 2004
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. aa
    Replies:
    0
    Views:
    543
  2. bsm
    Replies:
    1
    Views:
    363
    bruce barker
    Apr 24, 2007
  3. Gerdus van Zyl

    pure python gaussian blur

    Gerdus van Zyl, Aug 14, 2007, in forum: Python
    Replies:
    3
    Views:
    2,588
    sharpatali
    Dec 26, 2009
  4. Partial Blur

    , Aug 21, 2007, in forum: Python
    Replies:
    1
    Views:
    354
    Diez B. Roggisch
    Aug 21, 2007
  5. Replies:
    2
    Views:
    754
Loading...

Share This Page