TextMirror

 Create a text mirror of any webpage in just a few seconds - for free! Enter the URL:

stackoverflow-com-questions-2360777-ie6-and-jquery-document-ready-i-cant-access-dom-elements-2010-03-12

Mirrored: 12th of March 2010, 20:23 Original: stackoverflow.com Views: 61 Settings: Loading the mirror...

Link: canonical login | careers | about | faq _____________________________ Stack Overflow * Questions * Tags * Users * Badges * Unanswered * Ask Question IE6 and jQuery document.ready - I can't access DOM elements [IMG] I'll try to keep this brief but this is infuriating the hell out of me. :) I've got a javascript file that pre-processes json data into a bunch of drop down lists. It all works wonderfully except in IE6 (go on snigger, it's only to be expected huh?). Unfortunately it's for a web app that has about 60% IE6 users so it HAS to work. In IE6 I can't access any DOM elements to check data. I know this is an IE6 issue and I've checked the solutions online and tried implementing the timeOut function. This works in someplaces but I can't use this everywhere. There are places I need to filter results in some checkboxes based on the bound data in others and it's getting too much to keep putting timeout calls in. I've tried wrapping a big block of text inside the timeout method and that wasn't playing ball either. Sooo, I then tried modifying the script to do some of the work in the window.onload event thinking the DOM was sure to have loaded up if I placed my code in there, but whilst the event is firing I STILL don't have access to the DOM elements when querying: vote up -1 vote down star $(".ddl-customer").val() At this point jQuery HAS loaded because it's done all the pre-processing of my data. It's driving me nuts. I've got the preprocessed data processing in the $(document).ready() event beforehand. I need to surround the binding of that data in some event whereby IE6 has FOR SURE loaded the bloody DOM and doesn't keep giving me object null bloody reference errors. I frickin hate IE6. Can someone ease my pain? jquery ie6 edited Mar 2 at 3:49 asked Mar 2 at 3:46 [IMG] [IMG] flag FrustratedWithFormsDesigner lloydphillips 2,7410M30M16 1010M7 57% accept rate $(".ddl-customer").val() gets all (presuming form) elements with the class "ddl-customer" to retrieve their value. Is that really what you are trying to do? - scunliffe Mar 2 at 4:08 You can type javascript directly into the address bar to help your debugging. If you type javascript:alert($(".ddl-customer").val()); you'll see if it's returning the value you expect. - CurtainDog Mar 2 at 4:21 @scunliffe, yes, there's only one ddl with that class name anyway, I was just using it as an example, I can't get any values from anything in IE6. - lloydphillips Mar 2 at 22:01 @CurtainDog - nice tip but when I do that the DOM has fully loaded so it is returning a value, but I expected that. I need to find a way of delaying this code block to when the DOM has loaded. I'd expect window.load to have done this but it isn't. - lloydphillips Mar 2 at 22:03 Your Answer _____________________________________________________________________________________________ _____________________________________________________________________________________________ _____________________________________________________________________________________________ _____________________________________________________________________________________________ _____________________________________________________________________________________________ _____________________________________________________________________________________________ _____________________________________________________________________________________________ _____________________________________________________________________________________________ _____________________________________________________________________________________________ _____________________________________________________________________________________________ _____________________________________________________________________________________________ _____________________________________________________________________________________________ _____________________________________________________________________________________________ _____________________________________________________________________________________________ _____________________________________________________________________________________________ [ ] community wiki _____________________ OpenID Login Name _______________________________ _________________________________________ or Email _________________________________________ Get an OpenID never shown Home Page _________________________________________ [ Post Your Answer ] Browse other questions tagged jquery ie6 or ask your own question. Hello World! Stack Overflow is a collaboratively edited question and answer site for programmers - regardless of platform or language. It's 100% free, no registration required. about >> faq >> tagged jquery * 21809 ie6 * 702 asked 10 days ago viewed 36 times [IMG] Related jQuery $(document).ready() failing in IE6 How to get IE6 to recognize inserted DOM elements via jQuery insertAfter() IE6: get value of a DOM select element Delayed DOM update in IE6 using jQuery IE6 performance issues with adding className on multiple elements (jQuery tableHover plugin) How to prevent IE6 from refetching already-fetched images added via DOM manipulation jQuery detect IE6 using jquery.support NOT jquery.browser Javascript: document.referrer and ie6 options IE6 and IE7 do not handle margins properly on elements with height property IE6 - Element jumps when loading IE6 floated element wrapping problem CSS Overflow Problem in IE6 - Element Does Not Appear/Show Up padding:right for display:inline elements in IE6 Position: absolute not respecting parent element in IE6 IE6 - CSS - elements not floating corectly CSS padding on input element breaks ie6 ie7 IE6 - Elements won't disappear Click event for div with two floated elements on IE6 IE6 - Elements pop in and out feed icon question feed about | faq | blog | podcast | privacy policy | advertising info | contact us | feedback always welcome fS stackoverflow.com fS careers fS serverfault.com fS superuser.com fS meta howtogeek.com doctype.com cc-wiki, PEAK Internet svn revision: 6487 site design and logo is (c) 2010 stackoverflow.com llc; user contributed content licensed under cc-wiki with attribution required Stack Overflow works best with JavaScript enabled

Related mirrors