473,499 Members | 1,653 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

validate on blur ?

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.

Nov 18 '05 #1
6 3985
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." <zi**@info-scopeREMSPAM.co.il> wrote in message
news:eG**************@TK2MSFTNGP09.phx.gbl...
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.

Nov 18 '05 #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...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." <zi**@info-scopeREMSPAM.co.il> wrote in message
news:eG**************@TK2MSFTNGP09.phx.gbl...
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.


Nov 18 '05 #3
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." <zi**@info-scopeREMSPAM.co.il> wrote in message
news:eG**************@TK2MSFTNGP09.phx.gbl...
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.

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

"Rigs" <jc******@spartanmotors.com> wrote in message
news:eh*************@TK2MSFTNGP09.phx.gbl...
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." <zi**@info-scopeREMSPAM.co.il> wrote in message
news:eG**************@TK2MSFTNGP09.phx.gbl...
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.


Nov 18 '05 #5
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" <ks******@takempis.com> wrote in message
news:Oc**************@TK2MSFTNGP09.phx.gbl...
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." <zi**@info-scopeREMSPAM.co.il> wrote in message
news:eG**************@TK2MSFTNGP09.phx.gbl...
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.


Nov 18 '05 #6
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." <zi**@info-scopeREMSPAM.co.il> wrote in message
news:O8**************@TK2MSFTNGP11.phx.gbl...
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" <ks******@takempis.com> wrote in message
news:Oc**************@TK2MSFTNGP09.phx.gbl...
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." <zi**@info-scopeREMSPAM.co.il> wrote in message
news:eG**************@TK2MSFTNGP09.phx.gbl...
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.



Nov 18 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2535
by: delerious | last post by:
Please take a look at this page: http://home.comcast.net/~delerious1/index10b.html There is javascript code that is executed when the page is loaded. The code calls the focus() method and...
4
6167
by: George Hester | last post by:
http://home.nycap.rr.com/foryorisonly/site.htm The top one is very different from the bottom one. If you do not recognize the difference scroll the images to the right. Not that the toolbar...
7
1504
by: Ragnorack67 | last post by:
Hi, is it possible to change a form text field to this.blur() from a separate function? So, what I want to do is when a button is click it will runblur(), and cause form input name "xyz" to go...
1
2851
by: MikeinDC | last post by:
I found some free js that I want to use in a class project. The original HTML used <form name="form1"> and the W3C validator I am required to use fails it. It says there is no attribute"name"....
6
7880
by: 4Ankit | last post by:
hello all, i am having trouble understanding what the difference is between BLUR and FOCUS. I need to include these functions in my form and i am unsure what these features do and how i incorporate...
2
4441
by: Gerdus van Zyl | last post by:
Does anyone have a relatively fast gaussian blur implemented in pure python? Below is my attempt but it takes 2.9 seconds for a 320x240 image. Image comes from byte string: self.array =...
1
1604
by: chicorbleak | last post by:
Hello, I'm looking for an image manipulation library which would allow me to blur an oval-shaped part of my picture, instead of the whole thing. I couldn't find a way to do this using the tools...
2
3597
by: rajkm42 | last post by:
Hi friends, I have a gridview which loads an XML file to display a textbox and other dropdownlists. Which is used for data entry. The user will enter an empid in the textbox. Once leaving the...
4
1870
by: dolittle | last post by:
Hi, I have a 2 popup windows each with a textarea. I`ve attached 'blur' event to both of them. It works fine but if the cursor is inside the textarea and I`m click on the other window, the blur...
1
5417
by: SpaceMarine | last post by:
hello, when it comes to dhtml-based modals (as opposed to actual modal dialog- windows or popups), an effect seen all over the web is to render the background content a translucent shade of dark...
0
7132
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7009
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7178
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7223
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6899
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7390
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4919
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3103
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
302
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.