Hello,

i  use different values in a for Block like the code below, i want to  
shrink this code to  only one   if Block, but when the event appear , 
alwys the last  settings of zeittyp is used . theirfor i use the helpvar 
inside the event var zeityp = "xyz". Thsi is the only problem. How can 
i  fix this ?

thank you


                     if(zeittyp == "urlaub") {
                         label[zeittyp].addListener("mousedown", 
function(e) {
                             var zeittyp = "urlaub";
                             
this.selectedZeittyp.setValue(this.zeittypen[zeittyp]["title"]);
                             
this.selectedZeittyp.setBackgroundColor(this.zeittypen[zeittyp]["bgcolor"]);
                             
this.selectedZeittyp.setUserData("zeittyp",zeittyp);
                             },this);
                         }

                     if(zeittyp == "krank") {
                         label[zeittyp].addListener("mousedown", 
function(e) {
                             var zeittyp = "krank";
                             
this.selectedZeittyp.setValue(this.zeittypen[zeittyp]["title"]);
                             
this.selectedZeittyp.setBackgroundColor(this.zeittypen[zeittyp]["bgcolor"]);
                             
this.selectedZeittyp.setUserData("zeittyp",zeittyp);
                             },this);
                         }


------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to