Open GoogleCodeExporter opened 9 years ago
Taking a look, thanks for reporting and for providing your test code.
Original comment by auldrid...@gmail.com
on 7 Feb 2010 at 3:51
Ok, so the gist of your suggestion is to give the 'name' attr a higher
precedence than the 'id' attr? This does
make sense given the problem you've run into and the way radios work. Let me
play around and see how that
works out.
Original comment by auldrid...@gmail.com
on 7 Feb 2010 at 4:20
Precedence doesn't much matter, just that both cookify and cookeiFill used the
same
precedence. For radio button, I think giving "name" precedence is the right
thing
to do, but I haven't tried it the other way, nor looked at non-radio-button
situations.
Original comment by jwas...@gmail.com
on 7 Feb 2010 at 6:03
I've begun some work on this, but it turns out to be a bit more complicated
(doesn't it always?)
Radios are going to have to be handled specially since those of the same name
are mutually exclusive and,
therefore, cannot simply be iterated end to end to determine cookie value--if
the first is checked and the last is
not, then the lat causes the cookie to be wiped.
This also raises some questions in my mind about checkboxes. But I'm working
on it....
Original comment by auldrid...@gmail.com
on 3 Jun 2010 at 5:42
Any progress with this issue? If you need specific help let me know.
Original comment by john.pis...@gmail.com
on 12 Jun 2010 at 6:42
Issue 29 has been merged into this issue.
Original comment by auldrid...@gmail.com
on 10 Nov 2010 at 11:43
Issue 33 has been merged into this issue.
Original comment by auldrid...@gmail.com
on 19 Dec 2010 at 11:06
Giving this a hard look. r77 now isolates radios from other items. figuring out
what to do with them while allowing other elements to work properly. 7 tests
currently failing in the test suite while I ignore radios
Original comment by auldrid...@gmail.com
on 27 Jan 2011 at 4:33
Original comment by auldrid...@gmail.com
on 27 Jan 2011 at 4:34
Note to self, look back into http://api.jquery.com/Types#Map for thoughts on
dealing with radios.
Original comment by auldrid...@gmail.com
on 8 Feb 2011 at 2:11
There seems to be a problem with check-boxes also.
In the HTML file I've uploaded are two radio buttons and two check boxes with
ids and names as created by the asp.net CheckboxList and RadioButtonList
controls.
The Checkbox cookies are saved but they are not returned to their state when
the page is reloaded.
Original comment by StevenWe...@gmail.com
on 22 Dec 2011 at 8:51
Attachments:
Changing line 385 to use shift() instead of pop() does indeed work, and I say
this seems like the best change to make, and a VERY important one as well. The
entire cookie library is potentially unusable otherwise.
Another change that fixed this was to swap lines 416 and 418. CookieFill()
still checks for "id" first instead of "name", but this way it at least won't
break form the while() loop until it has also checked "name" (in the case that
there is no cookie value stored using the id). But still, it's best practice to
check the values in the same order as they were checked when cookified to avoid
confusion.
Both the above modifications have been working for me and make the most sense.
Original comment by mach...@gmail.com
on 20 Jan 2012 at 9:37
Original issue reported on code.google.com by
jwas...@gmail.com
on 7 Feb 2010 at 10:44Attachments: