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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.