Multiple selections from checkbox form - and others...
Hi! Got some questions that I hope you people can help me out with. 1) I want to manage a messagebord, mainly to remove unwanted/old messages. The messages are stored in a MySQL db. I have a sql method that select wanted data. I use the method in a form in a #in tag to displays the selected data, within the #in tag I added a <INPUT TYPE="checkbox" NAME="checked" VALUE=1>. I also have a hidden field submitting the id fields reffering to each selected record within the above mentioned #in tag. All looks just fine - the data is listed and checkboxes appear as they should. But trouble is - submitting the forms data will give me a list of 1's (only the checked out is submitted), and a list of _all_ selected row ids. I need just the ids corresponding to the checked out records. If it's at all possible - please tell me how to. 2) The DateTime module gives me all errors (on linux 2.0.35, zope 1.10.2, europe (error in timezone?) - is this something that'll be fixed in new zope releases, or does it exist a patch for it already? 3) I have a dtml_method called setup that handles the main look at my site. The method calls several other methods (content, navbar and links) and is initially beeing called from within index_html. How can I use the setup method from another dtml_method but have it so that the content method normally beeing called from setup be some other method (new_method)? Much appreciate your help Sture Lygren
raver@box.dust.za.net wrote:
Hi!
Got some questions that I hope you people can help me out with.
1)
I want to manage a messagebord, mainly to remove unwanted/old messages. The messages are stored in a MySQL db. I have a sql method that select wanted data. I use the method in a form in a #in tag to displays the selected data, within the #in tag I added a <INPUT TYPE="checkbox" NAME="checked" VALUE=1>. I also have a hidden field submitting the id fields reffering to each selected record within the above mentioned #in tag.
All looks just fine - the data is listed and checkboxes appear as they should. But trouble is - submitting the forms data will give me a list of 1's (only the checked out is submitted), and a list of _all_ selected row ids. I need just the ids corresponding to the checked out records. If it's at all possible - please tell me how to.
I usually solve similar problems by encoding the id in checkbox name, something like this <input type=checkbox name="id<!--#var dbid-->"--> and then use some manual labour to extract the fields from REQUEST.form.keys() --------------------- Hannu
On Tue, 20 Apr 1999 raver@box.dust.za.net wrote:
3)
I have a dtml_method called setup that handles the main look at my site. The method calls several other methods (content, navbar and links) and is initially beeing called from within index_html. How can I use the setup method from another dtml_method but have it so that the content method normally beeing called from setup be some other method (new_method)?
If you are calling your setup method from a different folder, and if that folder contains its own version of the content method then setup will automatically use it. (I hope am answering the right question!) Pavlos
Hi!
Got some questions that I hope you people can help me out with.
1)
I want to manage a messagebord, mainly to remove unwanted/old messages. The messages are stored in a MySQL db. I have a sql method that select wanted data. I use the method in a form in a #in tag to displays the selected data, within the #in tag I added a <INPUT TYPE="checkbox" NAME="checked" VALUE=1>. I also have a hidden field submitting the id fields reffering to each selected record within the above mentioned #in tag.
All looks just fine - the data is listed and checkboxes appear as they should. But trouble is - submitting the forms data will give me a list of 1's (only the checked out is submitted), and a list of _all_ selected row ids. I need just the ids corresponding to the checked out records. If it's at all possible - please tell me how to.
Hmmm... not sure if this is what you want, but if it is, then the answer might be (literally) right under your nose ;) Look at the HTML source for the management screen for a Zope folder. The process to select folders etc using checkboxes is similar to what you describe... If you structure your checkboxes as follows.... <INPUT TYPE="CHECKBOX" NAME="notes:list" VALUE="doe"> <INPUT TYPE="CHECKBOX" NAME="notes:list" VALUE="rae"> <INPUT TYPE="CHECKBOX" NAME="notes:list" VALUE="me"> Then the target of your form will get a 'notes' (variable/attribute) which you can loop over, process etc, Only the values where the checkbox has been selected will be included in the list. In place of 'doe, rae' me, you could enter the ids of the objects you want to delete, wame say as the Zope management screen does. Cheers, A.
Hi all, I got my ISP's okay to try installing Zope on his SPARC running SunOS 4.1.4. With ZHTTPServer, I get the follow message in the server error log file: dlopen: stub interception failed When trying to build a PCGI version with w_pcgi.py, I get a compile error in pcgi-wrapper.c - the type sig_atomic_t is defined in my Gun/Linux signal.h, but not the ISP's Sun/BSD signal.h. I'd appreciate any suggestions. Doug
participants (5)
-
Andy Smith -
Doug Wyatt -
Hannu Krosing -
Pavlos Christoforou -
raver@box.dust.za.net