Thanks for replying Scott.

I should have mentioned that $group.options[index] was the first syntax I tried. FF handles both. IE produces the same error for both syntaxes. To be honest, I was surprised at the apparent shortcut syntax. I'm not sure I should rely on it though. Basically, I just cut-and-pasted my latest code snippet without thinking which version of the syntax it was showing.

Any other thoughts? I'd sure appreciate yours or any other guru's help on this 
one.

Thanks heaps,
Chris

Scott Sauyet wrote:

Chris Jordan wrote:
function DeleteGroup(){
    var $group = $("#GroupKeyID")[0];
    var index = $group.selectedIndex;
    var groupname = $group[index];
    $.dump(groupname);
}

Do you have a test page we could look at?

Something looks suspicious there to me. In the first line, $group is defined to be a DOM object, presumably a SELECT one. In line two, you get its selectedIndex, but in line three you are trying to use it as an array with a numeric index. Do you want instead

    var groupname = $group.options[index]

? I don't know why FF would get this right, but perhaps it allows such short-cut access to the "options" property.

Good luck,

  -- Scott



--
http://www.cjordan.us

Reply via email to