[Dojo-interest] simple event handling
David S.
davidschein at alumni.tufts.edu
Mon Apr 3 12:34:48 MDT 2006
I am struggling with dojo.event.
The following behaves as expected, asyncronously fetching the accounts for my
consignor.
<input id="id_consignor" name="consignor" type="text" onchange="return
fill_accounts();" >
But when I have:
<script>
dojo.event.kwConnect({
srcObj: dojo.byId("id_consignor"),
srcFunc: "onchange",
targetFunc: "fill_accounts",
once: true
});
</script>
...
<input id="id_consignor" name="consignor" type="text" >
It not only fills the accounts when id_consignor changes, but also when the
id_accounts input itself changes.
Am I correct in thinking that the kwConnect method should have the same effect
as assigning the onchange event?
Thanks for any clarity,
David S.
More information about the Dojo-interest
mailing list