In Focus
Kolkata Chapter Developer Day: May 25
C# Corner Delhi Chapter Meet, May-18, 2013 Official Recap
Istanbul Chapter May 2013 2nd Seminar Announced : Learn WinJS, Windows Store, MVC
ANNOUNCEMENT: April 2013 Month Winners
Email :
Password :
Remember me?
Forgot password
Technologies
Monthly Leaders
ASK A QUESTION
C# Programming
Multi-threading
Microsoft Surface
Community Services
Java
.NET General
Office Interoperability
ReFS
Current Affairs
JQuery
Active Directory
Printing
Silverlight 5
Fun and Jokes
JSP
ADO.NET & Database
Project Management
WCF
Job Opportunities
Multimedia, Graphics, Flash
AJAX & Atlas
Remoting
Windows 8
Leadership
PHP
Algorithms & AI
Reporting
Windows Azure
Mac for Windows
Social Networking
Arrays & Collections
Robotics and Hardware
Windows Store Apps
Microsoft Feedback
TypeScript
ASP.NET & Web Development
Security & Cryptography
Workflow Foundation
Open Source Projects
Web Hosting
C# Language
Setup & Deployment
WPF
Operating Systems
Website Management
C# References
Sharepoint
XAML Language
Paid Projects
Windows Azure
CLR & .NET Internals
Speech & Voice Recognition
Site and Forums Feedback
Prizes, Awards, MVP
Windows Phone 7
COM Interoperability
Tablet PC
Announcements
Students & Beginner Projects
Database
Custom Controls
Testing and QA
Author Guidelines
Test Category
Database General
Design and Architecture
Visual Basic .NET
Bugs and Problems
Training & Certification
Oracle
Embedded Development
Visual C++
Forums Feedback
Web Development
SQL
Enterprise Development
Visual Studio 11
Site Feedback & Suggestions
Advertising, Marketing, SEO
SQL Server
Games, DirectX, and XNA
Visual Studio 2010
Site Spams
Android
Products
GDI+ and DirectX
Web Services
Miscellaneous
Cloud Computing
Office 2013
General
Windows Forms
.NET Books
Expression Tools
Products
LINQ
Windows Services
Ask the Author
HTML 5
SharePoint 2013
Migrating to .NET
Cutting-Edge
Career Advice
HTML, JavaScript, CSS
Windows 8
Mobile Development
.NET 5.0
Coffee, Chai Lounge
iPhone, iPad
Forum guidelines
Home
»
ASP.NET & Web Development
»
How to call Java Script function in ASP.NET TextBox OnTextChanged Event
Author
Question
honey
How to call Java Script function in ASP.NET TextBox OnTextChanged Event
Posted on: 03 Mar 2011
Hai,
I have two text boxes named txtDOB (Date Of Birth), and txtDOJ (Date of Join)
i have to compare both text boxes DOJ is not greater than DOB..
For this i wrote a java script function, my problem is how to cal that
java script function in txtDoJ's "OnTextChanged Event ",
If u know help me..
Thanks and Regards,
Honey.
Reply
Quick Reply
Report a Spam
Our Recommended Solutions
Image Sliding Using JavaScript in Windows Store App
Calling the ASP.Net Web API With jQuery and JavaScript
Web Service : Asynchronous call by using Java Script and DHTML behaviour
Introduction Of JSP Scripting Tags
Key Event Handling in Client Side Scripting (JavaScript) in ASP.NET
KeyPress Event of TextBox in ASP.NET
Dynamically Call a Function in C#
Calling Server Side Function From Link Button in ASP.NET
Introduction To Event Handling In Java
WCF Service using ASP.NET and Client Script
[ + ]
Author
Reply
Raja Krishnamurthy
0
0
Re: How to call Java Script function in ASP.NET TextBox OnTextChanged Event
Posted on: 03 Mar 2011
Try this: txtDoJ.Attributes.Add("onblur", "checkDates()"); Assuming checkDates() is the javascript function which you wrote. HTH
Happy Programming!!!
Regards,
Raja
Reply
Quick Reply
Krishna Garad
0
0
Re: How to call Java Script function in ASP.NET TextBox OnTextChanged Event
Posted on: 03 Mar 2011
try this
onTextChanged="javascript:JavscriptFunctionName()
It may help you.
Mark as "This Is Correct Answer" if helps you.
Reply
Quick Reply
honey
0
0
Re: How to call Java Script function in ASP.NET TextBox OnTextChanged Event
Posted on: 03 Mar 2011
using that code i am getting the following error,
why this this error comes, i used correct braces only
CS1026: ) expected
Reply
Quick Reply
Rajesh S
0
0
Re: How to call Java Script function in ASP.NET TextBox OnTextChanged Event
Posted on: 03 Mar 2011
hi Honey
You are asking that you need to check DOJ is not greater than DOB. In this case you cant check in OntextChanged Event because before fill the hole date how could you compare dates, so it cause error better you do this validation when you click submit button or any other control events but dont try to do in OnTextChanged Event.
I hope it may help you
Reply
Quick Reply
Suthish Nair
0
0
Re: How to call Java Script function in ASP.NET TextBox OnTextChanged Event
Posted on: 07 Mar 2011
If the query got resolved, then mark the post that helped you as Answer so will be helpful for others. Otherwise if you got the solution please share with us.
Mark as Answer
, on the post that helped you !!!.
Reach my blog
D 1981
!
Reply
Quick Reply
Quick Reply:
SEARCH ANSWERS
All
C# Programming
Cutting-Edge
Site and Forums Feedback
Miscellaneous
Web Development
Database
Products
Any Word
Exact Word
Our recommended forum posts
Vbscript
in my grid view i place 1 dropdownlist fill with some items
What is the career scope in .NET
post on facebook using asp.net c#
Avoid to display previous page after logout
Google API Key
create a excel worksheet in asp.net
Selected row from gridview to dropdown
Backspace Button function in textbox
Forum Development in asp .Net
HOT QUESTIONS
Import/Export Generic List Objects
C# read xml data information
javascript for submit form without using submit button
Create List accessible for other classes
Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)
mathematical euation
code is not working
Extracting Data from a listbox in Another Application
how can i locate a webbrowser control
About Textbox
SPONSORED BY
DynamicPDF ReportWriter Suite
PDF reports have never been easier to create. With our included WYSIWYG Designer, you can layout your reports, set up your data source and let DynamicPDF ReportWriter do the rest.