-
Jan 21st, 2011, 05:42 PM
#1
problem with field:select onchange event
I have two fields on my form:
<field:select field="sites" id="c_com_bc_elixir_domain_Issue_sites" itemValue="_id" items="${sites}" multiple="true" path="/sites" z="f/npfl6XVF6p2FRmaqaxLAXOVrw="/>
<field:select field="category" id="c_com_bc_elixir_domain_Issue_category" itemValue="id" items="${categorys}" path="/categorys" z="vR+0nBeIl6BhamtdnQuFbV2j8iA="/>
I'm trying to call the onchange event:
dojo.addOnLoad(function() {
dojo.connect(dijit.byId("_sites"), "onchange", function(){
alert("WORKS");
});
})
dojo.addOnLoad(function() {
dojo.connect(dijit.byId("_category"), "onchange", function(){
alert("Doesn't work");
});
})
Can anyone help? The only difference is the multile="true" and if I remove the multiple="true" from the sites field it quits working.
-
Jan 26th, 2011, 04:20 PM
#2
Capitalization issue.
This is really dumb and I don't know who to tell.
There is a capitlaization issue on the onchange event. If multiple=true it needs onchange all lower case. If not multiple it needs a capital C - onChange
dojo.addOnLoad(function() {
dojo.connect(dijit.byId("_site_id"), "onchange", function(){
alert("site");
});
dojo.connect(dijit.byId("_priority_id"), "onChange", function(){
alert("priority");
});
});
<field:select field="priority" id="c_com_bc_elixir_domain_Issue_priority" itemValue="id" items="${prioritys}" path="/prioritys" z="Y2j2uDhHMEpS3gM8NH9sBmZe4x0="/>
<field:select field="site" id="c_com_bc_elixir_domain_Issue_site" itemValue="id" items="${sites}" path="/sites" multiple="true" z="dCr2aheN2e9HU/54KSWlsjPCvj8="/>
-
Sep 28th, 2011, 07:07 PM
#3
Thanks!
This was very useful to me.
I'm not exactly using Roo tags right now but a derivative (otherwise I'd fill a bug report)
I'll try this with 1.2 later
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules