2 messages in com.googlegroups.google-desktop-developerFwd: how to refer Controls in Control...| From | Sent On | Attachments |
|---|---|---|
| Suman Kumar | 14 Jul 2008 19:57 | |
| Suman Kumar | 28 Jul 2008 19:15 |
| Subject: | Fwd: how to refer Controls in Control Array? checkBoxes created by .appendElement![]() |
|---|---|
| From: | Suman Kumar (suma...@gmail.com) |
| Date: | 07/28/2008 07:15:56 PM |
| List: | com.googlegroups.google-desktop-developer |
could anyone suggest any work around?
Thanks Suman
---------- Forwarded message ---------- From: Suman Kumar <suma...@gmail.com> Date: Jul 14, 10:58 pm Subject: how to refer Controls in Control Array? checkBoxes created by .appendElement To: Google Desktop Developer Group
Poblem Description : I used ".appendElement" method to add Items in the list box for each row in the Database table. Checkboxes,Images and edit are added to each Item of listbox using the same ".appendelement". I used the same name for each of the same type of dynamically added controls(Checkboxes,edit,images).Please find the code(XML) below used in loop to add items in the list.
Question ??
How can i refer those controls in Control Arrays(Checkboxes specially) in a for loop? E.g. We can use the "for" loop in javascript to refer each element in control array as mentioned below.How can we use the "for" loop in google Gadgets to refer those element in Control Array(Checkboxes) ???
/****To Refer element in control Array****** for (var i = 0; i < cartItemCheck.size ; i++) view.alert(cartItemCheck.value); ******/ /****To add dynamic Items in List at runtime*********** cartList.appendElement("<item height=\"70\" width=\"434\" onclick= \"item_onclick()\">\ <img name=\"cartItemImage\" x=\"82\" y=\"6\" src=\"assets\ \"+r.item(1) + "\" />\ <checkbox height=\"16\" name=\"cartItemCheck\" width=\"23\" x= \"9\" y=\"6\" downImage=\"checkbox_down.png\"\ image=\"checkbox_up.png\" overImage=\"checkbox_over.png\"\ checkedDownImage=\"checkbox_checked_down.png\" checkedImage= \"checkbox_checked_up.png\"\ checkedOverImage=\"checkbox_checked_over.png\" value=\"false \" />\ <edit height=\"16\" name=\"cartItemQty\" width=\"46\" x= \"323\" y=\"6\" color=\"#18384F\" font=\"verdana\" size=\"8\" value= \"" + r.item(4)+"\" />\ <label height=\"55\" name=\"cartItemName\" width=\"118\" color=\"#18384F\" font=\"verdana\" size=\"8\" wordwrap=\"true\" x= \"172\" y=\"6\">" + r.item(3)+ "</label>\ <label height=\"16\" name=\"cartItemPrice\" width=\"40\" color= \"#18384F\" font=\"verdana\" size=\"8\" x=\"407\" y=\"6\">" + r.item(5)+ " </label>\ </item>"); *****/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Desktop Developer Group" group.
To post to this group, send email to Goog...@googlegroups.com
To unsubscribe from this group, send email to
Goog...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/Google-Desktop-Developer?hl=en
-~----------~----~----~----~------~----~------~--~---




