What are you actually attempting to achieve?

On Jan 8, 10:23 am, jq noob <sammil...@alliancecom.net> wrote:
> So thanks for the input. Here is what I have as of right now.
>
> function uncheckRadio(obj) {
>
>         var i;
>         var choice = obj.form[ obj.name ];
>         for (i = 0; i < choice.length; i++)
>         {
>                 $('input[name="' + obj.name + '"]').attr('checked', false);
>         }
>
> }
>
> I guess I thought that there might be some function within Jquery that
> would allow you to just clear out an elements value even if it was a
> radio group. It seems like perhaps I should just leave the function
> straight JS, and put back in the "choice[i].checked = false;" maybe
> easier to read in this case? Any thoughts?
>
> On Jan 8, 8:46 am, Henry <rcornf...@raindrop.co.uk> wrote:
>
> > Eric Garside wrote:
> > > $('input[name="' + obj.name + '"]').attr('checked', false);
>
> > <snip>
>
> > And if the same page contains INPUT elements with the same name either
> > inside another form or outside of any form? It seems like a good idea
> > to use - obj.form - to restrict the context of the search, and even if
> > not necessary with the mark-up actually being used the restricted
> > search should still be quicker.

Reply via email to