![]() |
![]() OCAU News - Wiki - QuickLinks - Pix - Sponsors |
|
|||||||
| Notices |
|
Sign up for a free OCAU account and this ad will go away! Search our forums with Google: |
![]() |
|
|
Thread Tools |
|
|
#1 |
|
Member
Join Date: Jun 2001
Location: Melbourne
Posts: 924
|
I'm trying to perform the following (see here for an example, it shows it better ), with these extras...
When I click one of the parent nodes (one of those checkbox things) I want to fill each of the child nodes as checked. There's two easy ways to do this; by making them checked to begin with when they're hidden (but I'd prefer not to as then those checkboxes will still be sent with the form), or using a name without [] brackets in it, which will suck a bit because it's a lot easier processing all these checkboxes as an array on the other side of the server. I've found the following bit of code about checkboxes, but I tried it a way I thought it might work and nothing happened, can anyone shed any more light on it? http://www.faqts.com/knowledge_base/.../10757/fid/310 The actual code for the checkboxes looks as follows (and works fine when using the form data in the action script) PHP Code:
Last edited by Tanus; 16th September 2002 at 10:40 PM. |
|
|
|
| Join OCAU to remove this ad! |
|
|
#2 |
|
Member
Join Date: Jun 2001
Location: Sydney
Posts: 6,427
|
AFAIK the code you have should be work. That's quite strange that it doesn't. I had a quick look through 2 Java books to try and find anything to suggest otherwise, but I didn't find anything.
|
|
|
|
|
|
#3 | |
|
Member
Join Date: Jun 2001
Location: Adelaide
Posts: 2,377
|
Quote:
__________________
"That's the way good software gets designed. So if you pull out a piece it won't run" - Steve Ballmer |
|
|
|
|
|
|
#4 |
|
Member
Join Date: Jun 2001
Location: St. Albert, Alberta, CANA
Posts: 1,130
|
I'm not sure that I completely understand your problem. But I think that it is with the HTML rather than the JS. Try checked=true. Might fix your problem. I had a lot of probelms with checkboxes a few months ago, can't remeber all the things I did to fix 'em.
__________________
22" ViewSonic P225f, Lian-Li PC68, Enermax 465, Tyan Tiger MPX, Dual XP2400, 512MB REG ECCDDRSDRAM, Asus 9280 TD Geforce ti4200, 4x60GB, 160GB, 250GB Folding@Home V3 1000 Club Member Folding@Home 12500 Points Milestone est. July 2001 |
|
|
|
|
|
#5 | |
|
Member
Join Date: Jun 2001
Location: Sydney
Posts: 6,427
|
Quote:
Yeah... That's a good excuse.
|
|
|
|
|
|
|
#6 |
|
Member
Join Date: Jun 2001
Location: Melbourne
Posts: 924
|
I found out the problem. Mozilla based browsers have changed the way form elements can be accessed to be more standards compliant. Microsoft doesn't of course. So I've had to change the way the bracket named elements are accessed.
|
|
|
|
![]() |
| Bookmarks |
|
Sign up for a free OCAU account and this ad will go away! |
| Thread Tools | |
|
|