Jump to content

[SOLVED] accessing checkbox group through php


brodywx

Recommended Posts

I know this doesn't relate to php right now, but eventually it will use php code. Still if someone could help me it would be much appreaciated.

 

I want to know how to check/uncheck checkboxes using javascript. My checkboxes are part of a group (name="group[item]"). The items are random and not sequentially ordered in any way.

 

I assumed this code would work, but it's giving me a page error:

 

document.myForm.group[item].checked=1;

 

 

Anyone?

Yes I tried that. I think it has something to do with the name group[item]. If the name was not an array type the line works just fine, but javascript doesn't like it when the checkbox name is an array, so has anyone ever done it before? I know it must be possible.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.