CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 CC Newbie need help with multiple deletions

Print topic Send  topic

Author Message
dAi
Posted: 02/20/2002, 12:21 AM

Need help with a cc form. What I want is a list of entries from the db and a checkbox for each row and then be able to chek the boxes for those rows that i want to delete by clicking a delet-button. If you don't get my question pleas aks and i will try to give you a more detailed descripton.

/dAi
Nicole
Posted: 02/20/2002, 2:07 AM

Hello,
refer to following article on this site:
http://www.gotocode.com/art.asp?art_id=51&
Andrew B
Posted: 02/20/2002, 7:15 PM

I guess I did it the hard way. I can include the code if anyone else wants it.

I made one master check box called 'checkAll' and tied JS to it. In the grid form I filled in the custom field like in the tips article. In my version each checkbox has a different value field which is set to the ID. In a seperate form below I have hidden fields for the items to be deleted or moved, and a field for the 'action'.

JS itterates through the list of items and generatets a comma seperated list of values to delete. It takes them from the top form and puts them in the 'hidden' form below which is actually submitted by JS in the 'delete selected' and 'move selected' buttons. Also, this lower box has a combo specifying where to move them to.

Then, on the target page i check the string to make sure that all the values are numeric, and then execute
"DELETE FROM table WERE my_id IN (" & sToDelete & ")"

Damn I did it the hard way. In my defense I need to say this : I got 2 hours of sleep the night before and wasn't thinking straight. CC makes the sleep deprevation worse since it forces me out of familiar habits. Probably would do it that way if I could now. Not so sure how easy it would be in JS to have a 'check all' checkbox where the boxes are different names.

It's about 80 lines of js (maybe less) and a few bits of stuff in the header/footers. If ya want it lemme know. I'll help anyone make it works who needs help.

p.s. Got 4 hours last night. This is not good :(

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.