onchange event from select box to update field
On this page: http://www.blackdownluxurylettings.co.uk/place_booking/2010-3-18,2
I am using an onchange event on the 开发者_运维知识库"number of days" select box to update the "departure date" field.
But currently nothing is happening.
Any ideas?
Just looking at it quickly: wouldn't you want the ONCHANGE
event attached to the SELECT
tag rather than the individual options?
You can bind it this way using JQuery:
$("#ddlNumberOfDays").bind('change', mainPharmacy_Change)
Maybe for javascript, you should just try 'change'
.
If I recall correctly, the regular Javascript onChange
event only fires once the select box loses focus AND it's contents have been changed. I don't know how jQuery achieves it, but their change method will fire whenever the contents are updated.
Also, I get the following error in my Javascript console when loading your page:
[cycle] terminating; zero elements found by selector
精彩评论