Results 1 to 3 of 3

Thread: problem with field:select onchange event

Hybrid View

  1. #1
    Join Date
    Jan 2011
    Posts
    7

    Default 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.

  2. #2
    Join Date
    Jan 2011
    Posts
    7

    Default 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="/>

  3. #3
    Join Date
    Apr 2010
    Posts
    11

    Default

    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
  •