Hi -
I'm experiencing the same problem with IE6 where I get an error Could
not set the selected property. Unspecified error when executing the
code:
$(option:first, #my_select).attr(selected,true);
OR $(option:first, #my_select).attr(selected,selected);
OR $(#my_select).children([EMAIL
my code looks like this:
for(var i=0; i$(#smsUserPrice).children().size(); i++){
curSmsOption =
$(#smsUserPrice).find(option:eq(+i+));
if($(curSmsOption).attr(value) ==
Just as an aside, related to a recent thread entitled 'Performance tip' (
http://groups.google.com/group/jquery-en/browse_thread/thread/15a11a44b29c27b2/d8bfffd73b4ebb9f#d8bfffd73b4ebb9f)
please, please, please for everyone's sanity don't do
$(...).children().size() in the body of a for loop,
Hi Jakob,
Instead of:
$(curSmsOption).attr(selected, true);
try:
$(curSmsOption).attr(selected, selected);
--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On May 24, 2007, at 8:00 AM, [EMAIL PROTECTED] wrote:
for(var i=0;
Oh yes, sorry I forgot the ); after the function passed to $.each().
Corrected (and tested!) version is below:
function test()
{
$(#smsUserPrice option).each(function()
{
// $(this) is the current option element
var value = $(this).val();
if (value == z)
On May 25, 1:29 am, Rob Desbois [EMAIL PROTECTED] wrote:
Oh yes, sorry I forgot the ); after the function passed to $.each().
Corrected (and tested!) version is below:
It seems to me that the only jQuery function necessary is .each,
subsequent use of $ is unnecessary.
If the intention is to
6 matches
Mail list logo