Check out the LimeSurvey source code on GitHub!

Internet Explorer and jQuery's $(document).ready() call.

More
5 years 3 months ago #68190 by HCI_Guy
This isn't a LimeSurvey issue, per se, but it is definitely an issue when modifying questions and content at run-time.

I have a survey that works under browsers outside of IE. Apparently, I see that this is because IE cannot be trusted to correctly determine when the DOM is loaded, hence leading to a race condition if one calls
$.ready(function(){...});
on a long page.

What do other people do to get around this? I've seen a suggestion elsewhere to move
$.ready(function(){...});
to the end of the page, and another solution to actively poll and determine when the page is indeed ready (but it's an old page).

Does anyone have a good, unified way to go about doing this?

Thank you!

Please Log in to join the conversation.

More
5 years 3 months ago - 5 years 3 months ago #68191 by HCI_Guy
FIXED.

Thanks to this site .

Rather than use
$(document).ready(function() {...your code...});
use instead
jQuery(function() {...your code...});

I'll put this in the documentation , and add a note about this being a requirement for IE to honor DOM loading, as others must at some point benefit from this too.
Last Edit: 5 years 3 months ago by HCI_Guy. Reason: Adding links and information.

Please Log in to join the conversation.

More
5 years 3 months ago #68202 by Mazi
Thanks for your feedback. Can you please open a ticket at our Bugtracker as well so that our developers can have a look at it and maybe overwork the source code!?

Thanks!


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form