Oops, I forgot the id in the input:
<input type="radio" id="ItemList" name="myRadio" value="blah" />

Oh, and make sure you only have one id="ItemList" in your HTML. You
cannot have several elements with the same id.

On Mar 3, 3:36 pm, James <james.gp....@gmail.com> wrote:
> The code looks fine. Do you have a value defined on your radio input?
>
> Suppose your input is:
> <input type="radio" name="myRadio" value="blah" />
>
> and your code is:
> $("#ItemList:checked").val()  // returns 'blah' if radio is checked
> $("#ItemList").is(":checked");  // returns true if radio is checked
>
> On Mar 3, 3:56 am, Swatchdog <scott.swatch...@gmail.com> wrote:
>
> > I have an order edit form that is fed from Coldfusion/SQL that shows a
> > radio list of possible product selections. If the customer is editing
> > an order that has already been submitted, one of the products in the
> > radio list is selected. If it is a new order, none is selected.
>
> > Upon load, I need to determine which one, if any, is selected so that
> > I can turn manipulate other elements on the page.
> >  The div for the radio input list is id = ItemList.
>
> > This below does not work, it returns "Undefined" in the alert box.
>
> > $(document).ready(function() {
> >         alert($("#ItemList:checked").val());
>
> > });
>
> > Can someone throw this jPup a bone?
>
> > Thanks
> > SWimmer
>
>

Reply via email to