cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Lundquist ...@wrinkledog.com>
Subject [forms+flow v2] removeRow(0) no work?
Date Tue, 16 Mar 2004 21:45:59 GMT
Hello,

I've got the following flowscript:

     function addPromo (text) {
         var row = wid.promos[wid.promos.length];
         row.text.value = text;
         var button = row.deleteButton;
         button.onClick =
             function () {
                 // wid.promos.removeRow (0);
                 // return;
                 var index = button.getParent().getId();
                 wid.promos.removeRow (parseInt(index));
             }
     }

Simple repeater, each row has a text field and a "delete" button that 
deletes the row.  It works except for row 0!  I can delete all the 
other rows, but whenever I try to delete the first row, nothing 
happens.

As a sanity check, I added the 2 lines of code that are commented out 
above, and then all my buttons do nothing.

What might the problem be here?

Thanks a lot,
Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message