Thanks, but I didnt say I didnt want them to have the same name, I said that
the script didnt work when the names were arrays.

When the radio button groups have an name with an array, the script breaks
and you can select/deselect multiple radio buttons within the group.

Here's an example:

<label for="q1-1">1</label><input type="radio" name="q[1]" value="1"
id="q1-1" />
<label for="q1-2">2</label><input type="radio" name="q[1]" value="2"
id="q1-2" />
<label for="q1-3">3</label><input type="radio" name="q[1]" value="3"
id="q1-3" />
<label for="q1-4">4</label><input type="radio" name="q[1]" value="4"
id="q1-4" />

<label for="q2-1">1</label><input type="radio" name="q[2]" value="1"
id="q2-1" />
<label for="q2-2">2</label><input type="radio" name="q[2]" value="2"
id="q2-2" />
<label for="q2-3">3</label><input type="radio" name="q[2]" value="3"
id="q2-3" />
<label for="q2-4">4</label><input type="radio" name="q[2]" value="4"
id="q2-4" />

<label for="q3-1">1</label><input type="radio" name="q3" value="1" id="q3-1"
/>
<label for="q3-2">2</label><input type="radio" name="q3" value="2" id="q3-2"
/>
<label for="q3-3">3</label><input type="radio" name="q3" value="3" id="q3-3"
/>
<label for="q3-4">4</label><input type="radio" name="q3" value="4" id="q3-4"
/>

<label for="q4-1">1</label><input type="radio" name="q4" value="1" id="q4-1"
/>
<label for="q4-2">2</label><input type="radio" name="q4" value="2" id="q4-2"
/>
<label for="q4-3">3</label><input type="radio" name="q4" value="3" id="q4-3"
/>
<label for="q4-4">4</label><input type="radio" name="q4" value="4" id="q4-4"
/>



The first two groups DONT work right, but the last two groups DO work.

array name: q[4] vs non-array name: q4

With the first two groups, I can select all or some of the radio buttons in
the group. This appears to be purely a cosmetic/UI issue since only the
value of the last one selected in the group gets submitted in the post (as
it should).

Something in the script doesnt support the array names.






George-147 wrote:
> 
> 
> 
> Sorry instead of "Why do you want to give them the same name?"
> 
> I meant to say "Why do you not want to give them the same name?"
> 
> George.
> 
> 
> On Nov 13, 3:06 pm, George <[EMAIL PROTECTED]> wrote:
>> The problem that regular radio buttons are working only when they have
>> the same name.
>> No wonder prettty ones not working too... :)
>>
>> Why do you want to give them the same name?
>> You can use different ids if you want. Something like this
>>
>> <input type="rario" name="group1" id="group1_1">
>> <input type="rario" name="group1" id="group1_2">
>> <input type="rario" name="group1" id="group1_3">
>>
>> George.
>>
>> On Nov 12, 2:05 pm, Ahhk <[EMAIL PROTECTED]> wrote:
>>
>>
>>
>> > Anyone know how to fix this?
>>
>> > --
>> > View this message in
>> context:http://www.nabble.com/PrettyCheckboxes-not-working-with-radio-array-n...
>> > Sent from the jQuery General Discussion mailing list archive at
>> Nabble.com.- Hide quoted text -
>>
>> - Show quoted text -
> 
> 

-- 
View this message in context: 
http://www.nabble.com/PrettyCheckboxes-not-working-with-radio-array-names-tp20412719s27240p20490058.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to