[Zope] How to reference the list checkbox thru
Paul Chung Chee Soong
HCSCCS@prudential.com.my
Fri, 23 Jul 1999 11:12:05
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.