Solved

How to trigger an event with jquery?

Posted on 2012-03-28
2
323 Views
Last Modified: 2012-03-28
I have two text boxes as a date fields and I need that after altering the first one, the second one automatically shows a new date (a month after the previous date)

The second field can be modified manually, the event only must be triggered after altering the first text box / date.

Regards.
0
Comment
Question by:dimensionav
2 Comments
 
LVL 40

Accepted Solution

by:
gurvinder372 earned 250 total points
ID: 37776573
you can bind the blur event to first textbox

$("#textbox1").bind("blur", function(){

 $("#textbox2").val(calculateNextDate());
});

function calculateNextDate()
{
}
0
 
LVL 108

Assisted Solution

by:Ray Paseur
Ray Paseur earned 250 total points
ID: 37776728
You might make a Google search for "jQuery Date Picker" - there are a lot of solutions that will work for this sort of thing.  Not exactly what you want but a good demonstration of the principles is available here:
http://jqueryui.com/demos/datepicker/
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

These days socially coordinated efforts have turned into a critical requirement for enterprises.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now