• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to make Change in text field whenever i choose a date from calender image.

 
swati mittal
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have two text field for date, one have inception date and other have expiration date.
I have put an calender image with inception date text field.

Requirement is - Whenever i select inception date from calender then one java script is called to automatically calculate expiration date based upon inception date.

Problem is - expiration date field should be fill automatically with date whenever i select inception date. i have put onchange on field but its not working properly. can anybody help me regarding this.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64196
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please take the time to choose the correct forum for your posts. This forum is for questions on JSP.

For more information, please read this.

This post has been moved to a more appropriate forum.

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64196
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
swati mittal wrote:... but its not working properly.

Is your keyboard bursting into flame? Computer spitting acid on you?

Please read this.
 
swati mittal
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to me it is a jsp question because i m working on jsp.
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSP is just a view technology. If you write Javascript in a JSP file and have problems with Javascript, it still doesn´t make it a JSP problem. To prove it, copypaste it into a plain HTML file and you´ll see that the same problem still exhibits.

And please tell the details, yes. What happens and what happens not? How can we reproduce the same problem?
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
onchange event only fires when the user changes the text. It does not change when JavaScript changes it.

You either need to change the calendar code to do what you need or you have to build your own listener which is sort of a waste of computer resources.

Eric
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64196
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
swati mittal wrote:According to me it is a jsp question because i m working on jsp.
Your question has nothing to do with JSP. Please post in the correct technology forum. Thanks.
 
RaviNada Kiran
Ranch Hand
Posts: 528
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi swathi , AJAX is one of the solution or else

You can go for onchange event , post your code so that i can help you .
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic