Onchange function can't invoke from combobox, if the change made from JavaScript function. Say for example I have three combobox participant, margin group, Account Code. If 开发者_如何学运维I change participant will call a function, margin group values added based on participant value. Account Code values added based on margin group. The problem rise when Margin Group changes made by JavaScript function not by user. Is there any event for this situation?
Then in that case, you can to trigger the event manually. If you are using jQuery, you can use the trigger event to trigger the change event http://api.jquery.com/trigger/
Alternatively, you can define the function for onChange call backs then manually call that function. The following are some psudo code.
AccountCode.onChange
call account_code_changed()
end
Marin Group.onChange
# do something else
call account_code_changed() directly
end
精彩评论