Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

OnChange and Calander popup

 
Sujatha Kalluri
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a text field on which I am writing onChange event. The value of text field is getting changed by calander popup by selecting date from calander, but onChange event is not fired unless I manually change the text field, how can we force the event to fire when date is selected by calander popup.

any hints please...??

here is my onchange code


 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe (but could be wrong) onchange is specifically for UI events; it wouldn't fire if you populated it via a simple jQuery call, either.

Maybe hook into the widget code, or use onblur?
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you use event handlers, do not use javascript:

onchange does not get fired when you change the value with JavaScript. It only gets fired when a person changes the value. The Calendar code should have an event build in when the user selects a date. If it does not, than that is a poor component.

Eric
 
Sujatha Kalluri
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David Newton wrote:I believe (but could be wrong) onchange is specifically for UI events; it wouldn't fire if you populated it via a simple jQuery call, either.

Maybe hook into the widget code, or use onblur?


How do I use the onBlur with calander popup

sK
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please see Eric's response.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic