Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > validate on blur ?

Reply
Thread Tools

validate on blur ?

 
 
Kevin Spencer
Guest
Posts: n/a
 
      06-28-2004
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." <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.
>
>
>



 
Reply With Quote
 
 
 
 
Cowboy \(Gregory A. Beamer\) [MVP]
Guest
Posts: n/a
 
      06-28-2004
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...b;en-us;316719
http://support.microsoft.com/default...b;en-us;816166

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

************************************************
Think Outside the Box!
************************************************
"z. f." <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.
>
>
>




 
Reply With Quote
 
 
 
 
z. f.
Guest
Posts: n/a
 
      06-28-2004
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.



 
Reply With Quote
 
Rigs
Guest
Posts: n/a
 
      06-28-2004
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." <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.
>
>
>



 
Reply With Quote
 
Rigs
Guest
Posts: n/a
 
      06-28-2004
NOTE: Please remove the " ' " (apostrophes) from code. They were
accidently left in.
-Rigs

"Rigs" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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." <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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.
> >
> >
> >

>
>



 
Reply With Quote
 
z. f.
Guest
Posts: n/a
 
      06-29-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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." <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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.
> >
> >
> >

>
>



 
Reply With Quote
 
Kevin Spencer
Guest
Posts: n/a
 
      06-29-2004
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." <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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." <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > 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.
> > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Blur tutorial extra part, How Much Blur? Wayne J. Cosshall Digital Photography 0 02-16-2007 02:10 AM
window.blur() works only upon refresh aa HTML 0 10-19-2004 06:45 PM
Blur : How to remove an edge as a result of editing an image n Digital Photography 0 05-19-2004 01:13 PM
Blur on thumbnails of Sony DSC-S50 jpg-s panagiotis Digital Photography 0 12-26-2003 06:23 PM
Storage, Blur and other issues Andrew E Digital Photography 9 10-16-2003 01:19 PM



Advertisments