Welcome, Guest
Username: Password: Remember me

TOPIC: jQuery script failure and survey page mis-count

jQuery script failure and survey page mis-count 4 years 9 months ago #60029

  • danpaul000
  • danpaul000's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 9
  • Karma: 0
Hi all,

I am running a survey on version 1.90 (build 9046) with all the questions on one page. I have built in several jQuery scripts that listen for a response on a checkbox and then set a radio button accordingly to whether the checkbox is checked or un-checked. See code below:
<script type="text/javascript" charset="utf-8">
$('#answerSSXGGX1').change(function() { 
	if ( $('#answerSSXGGX2B').attr('checked') == true) {
		$('#answerSSXGGX2A').attr('checked', true);
	else {
		$('#answerSSXGGX2B').attr('checked', true);

This script consistently works fine in all my testing. However, when other people are taking it, I notice the following issues:

- About 10% of the survey responses contain the wrong result for the script-set radio buttons.

- Any case with an incorrect value is set to the default value of the question, telling me the script most likely did not trigger at all.

- In ALL CASES where the script-set buttons are incorrect, the "Last Page Seen" value in the response export is 1. For the correct cases, this value is 2, with all the questions being on the first page, and the second/last page being the post-submission landing page.

- The majority of the surveys with "Last Page Seen" = 1 still show as complete, with an appropriate time/date stamp in the "Completed" column of the response export.

- All cases with "Last Page Seen" = 2 (with all correct answer responses) show a start and complete timestamp of the exact same time, to the second, as if all the surveys were taken in zero time. (Across multiple surveys there are different times, but each individual one shows the same time for start/finish, that is)

I think the script is straightforward enough that the issue might be one on the server, or at least on a larger scope than the individual question. I originally though the surveys might be timing out, but have since set the time-out to 18 hours and am still observing the same issue.

I know this seems very convoluted, but any advice or pointers would rock. Thanks so much!

The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.117 seconds