[Dojo-interest] Multiselect question

Jette Derriche jni at nerdgirl.dk
Fri Aug 8 06:04:51 UTC 2008


On Fri, 2008-08-08 at 10:01 +1200, Robert Coup wrote:
> 
> So you could move the buttons outside the <form>, or change the above
> code to:
> 
> 
> dojo.query("button.switch").connect("onclick",function(e) {
>   switch(e.target.id.toString()){
>     case "airportLeft" :
> dijit.byId("airport2").addSelected(dijit.byId("airport1")); break;
>     case "airportRight" :
> dijit.byId("airport1").addSelected(dijit.byId("airport2")); break;
>   }
>   // cancel the click event so we don't submit the form.
>   dojo.stopEvent(e);
> });

Thank you! It works now...I never use the <button>, I always use <input
type...> so I had forgotten how the <button> works - and I was so sure
it was a javascript issue ;-) ... stupid me.

/Jette



More information about the Dojo-interest mailing list