How to reference the list checkbox thru
Thanks again. I got you now. But how can I refer the checkbox via Javascript. For example, the name of the checkbox is 'pno:list'. I got error when refering to it's propoties:- document.myForm.pno[count].value or document.myForm.pno:list[count].value or document.myForm.pno[count]:list.value Is that possible?? ---------- From: "Phillip J. Eby" Sent: Thursday, July 22, 1999 7:20 AM To: Paul Chung Chee Soong; zope Subject: RE: [Zope] Bulk insert in Zope's ZPyGres Content-Type: text/plain; charset="us-ascii" X-Loop-Detect: 1 At 10:37 AM 7/22/99 +0000, Paul Chung Chee Soong wrote:
Thanks. But how do use insert statements thru Z SQL Mtehod submitting it
again? We will need to submit the web page a lot of times to get the variables across, wouldn't we? How do we address this problem ?
As I said before, just make the checkbox field a :list field, and have your SQL method do an <!--#in--> block that loops over it to create a series of INSERT statements in one batch. For example, if your checkbox field is called "item_to_borrow:list". Your SQL method would look something like: <!--#in item_to_borrow--> INSERT INTO my_table (the_item) VALUES (<!--#var sequence-item-->) <!--#/in--> Obviously, you would need to change this to suit the values you actually need to insert. The above will generate a series of INSERT statements in a single batch, one for each checked item. When the SQL method runs, it will send all the INSERT's to the database at once.
At 13:12 23/07/99 , Paul Chung Chee Soong wrote:
Thanks again. I got you now. But how can I refer the checkbox via Javascript. For example, the name of the checkbox is 'pno:list'. I got error when refering to it's propoties:- document.myForm.pno[count].value or document.myForm.pno:list[count].value or document.myForm.pno[count]:list.value Is that possible??
Some untested options: document.myForm.elements('pno:list')[count].value document.myForm.elements('pno:list').items(count).value document.myForm.elements.items('pno:list', count).value document.myForm.elements[indexOfFirstCheckbox + count].value -- Martijn Pieters, Web Developer | Antraciet http://www.antraciet.nl | Tel: +31-35-7502100 Fax: +31-35-7502111 | mailto:mj@antraciet.nl http://www.antraciet.nl/~mj | PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149 ------------------------------------------
participants (2)
-
HCSCCSï¼ prudential.com.my -
Martijn Pieters