Awhile back I actually found an interesting page on that subject: http://www.sixteensmallstones.org/ie-javascript-bugs-overriding-internet-explorers-documentgetelementbyid-to-be-w3c-compliant-exposes-an-additional-bug-in-getattributes
It basically has code to fix the getElementsById for IE when it's broken, in an interesting way that fixes the function itself. As jQuery aims to avoid doing things that might conflict with other libraries, and I think there are a few things in the code itself that could be done better, I wouldn't recommend throwing it directly into Sizzle. However it is a good starting point to modifying the Sizzle id grabbing code so that using the selector will always work correctly. ~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://nadir-seen-fire.com] -Nadir-Point (http://nadir-point.com) -Wiki-Tools (http://wiki-tools.com) -MonkeyScript (http://monkeyscript.nadir-point.com) -Animepedia (http://anime.wikia.com) -Narutopedia (http://naruto.wikia.com) -Soul Eater Wiki (http://souleater.wikia.com) xwisdom wrote: > Thanks John. Will do. > > On Jan 28, 4:27 pm, John Resig <[email protected]> wrote: > >> Yeah, there's a bug with IE returning elements that have a specific ID >> from getElementsByName, we'll need to workaround this issue. >> >> Could you file a bug? Thanks. >> >> --John >> >> On Wed, Jan 28, 2009 at 12:33 PM, xwisdom <[email protected]> wrote: >> >> >>> Hello Everyone, >>> >>> I was just using jQuery 1.3.1 when I came across an issue in IE7. When >>> I click the button the value for the button will be set to "ON" when >>> using IE7 but it works as expected in FF3: >>> >>> Expected result: Value on hidden field should be set to "ON" when the >>> button is clicked >>> >>> Wrong result: The value for the button changed to "ON" when the button >>> is clicked in IE7 >>> >>> Sample Code: >>> >>> <form> >>> <input type="hidden" name="button" value="" /> >>> <input type="button" id="button" value = "Button" /> >>> </form> >>> <script type="text/javascript"> >>> $(function() { >>> $('#button').click(function(){ >>> $("form input[name='button']").val('ON'); >>> }) >>> }); >>> </script> >>> > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---
