Handling textbox's lostfocus event
-
Hi to all, I am new to ASP.net and i want to execute some code after textbox's lostfocus event in ASP.Net. I tried by using its TextChanged event but it takes more time to execute it because it executes on server, i want to execute this code on client machine only. how can i do this? Help me. Thanks.
Pravin
-
Hi to all, I am new to ASP.net and i want to execute some code after textbox's lostfocus event in ASP.Net. I tried by using its TextChanged event but it takes more time to execute it because it executes on server, i want to execute this code on client machine only. how can i do this? Help me. Thanks.
Pravin
pavya_Cool wrote:
i want to execute this code on client machine only. how can i do this?
You could use a client side script such as Javascript with the
onChange()
event handler - it depends what code you want to run though. Regards, --Perspx"The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia Introduction to Object-Oriented JavaScript
-
Hi to all, I am new to ASP.net and i want to execute some code after textbox's lostfocus event in ASP.Net. I tried by using its TextChanged event but it takes more time to execute it because it executes on server, i want to execute this code on client machine only. how can i do this? Help me. Thanks.
Pravin
use
onblur
Property for Lostfoucs on Client Sidecheers, Abhijit Check My Latest Article
-
pavya_Cool wrote:
i want to execute this code on client machine only. how can i do this?
You could use a client side script such as Javascript with the
onChange()
event handler - it depends what code you want to run though. Regards, --Perspx"The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia Introduction to Object-Oriented JavaScript
Hi, Thanks for reply. I tried this by using the following function. txtusername.Attributes.Add("onchange", "txtusername_TextChanged()") but i am not getting success. Also i am not able to trace it.
Pravin
-
Hi, Thanks for reply. I tried this by using the following function. txtusername.Attributes.Add("onchange", "txtusername_TextChanged()") but i am not getting success. Also i am not able to trace it.
Pravin
pavya_Cool wrote:
txtusername.Attributes.Add("onchange", "txtusername_TextChanged()")
your trying to run a Server side function, you cant do it using this way. just use ther javascript function txtusername.Attributes.Add("onchange", "javaScriptFunction()")
cheers, Abhijit Check My Latest Article
-
use
onblur
Property for Lostfoucs on Client Sidecheers, Abhijit Check My Latest Article
thanks, actually iam new to javascript... i have to check this first...
Pravin
-
thanks, actually iam new to javascript... i have to check this first...
Pravin
sure , just check it and let me know .
cheers, Abhijit Check My Latest Article