| Author |
The Onchange Event is Not Fireing for My Input Tag
|
Steve Dyke
Ranch Hand
Joined: Nov 16, 2004
Posts: 1254
|
|
|
I have an input tag that is readonly and an onclick method that requests a calendar form. When the user click a date the input tag value changes to the selected date. I also have an onchange method that I need to fire to make an ajax request. This onchange event is not fireing.
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56185
|
|
|
As the user cannot change the value of a read-only field, a change event can never trigger.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Steve Dyke
Ranch Hand
Joined: Nov 16, 2004
Posts: 1254
|
|
Bear Bibeault wrote:As the user cannot change the value of a read-only field, a change event can never trigger.
Thanks Bear. I figured it was something like that. I will have to figure out another solution.
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
Steve Dyke wrote:I have an input tag that is readonly and an onclick method that requests a calendar form. When the user click a date the input tag value changes to the selected date. I also have an onchange method that I need to fire to make an ajax request. This onchange event is not fireing.
onchange does not fire when JavaScript sets the value.
Doesn't the calendar have a callback method or an event it triggers?
Eric
|
 |
Steve Dyke
Ranch Hand
Joined: Nov 16, 2004
Posts: 1254
|
|
Eric Pascarello wrote:
Steve Dyke wrote:I have an input tag that is readonly and an onclick method that requests a calendar form. When the user click a date the input tag value changes to the selected date. I also have an onchange method that I need to fire to make an ajax request. This onchange event is not fireing.
onchange does not fire when JavaScript sets the value.
Doesn't the calendar have a callback method or an event it triggers?
Eric
Yes, I figured out that I can just call the method I need at the calendar click event.
|
 |
 |
|
|
subject: The Onchange Event is Not Fireing for My Input Tag
|
|
|