View Issue Details

This bug affects 1 person(s).
 0
IDProjectCategoryView StatusLast Update
04111Bug reportsConditionspublic2010-02-13 17:15
Reporterapps Assigned Tolemeur  
PrioritynormalSeveritycrash 
Status closedResolutionfixed 
Product Version1.87 
Fixed in Version1.87+ 
Summary04111: IE throws errors "Expected object" when filling a text answer (that is conditional-driven)
Description

How to reproduce:
1) put a numerical question as first
2) put a text question as second
3) put them in the same group
4) set survey to be presented question-by-question
3) bind the 2nd question to 1st with one condition based on whatever (example: 1st aswer must be > 0)
4) start the survey (test mode ok)
5) give an aswer that triggers the 2nd question
6) put your cursor in the textarea and press a key

What went wrong:
when you try to insert some text in the textarea, at every key you press, you get a popup with error. Happens only in IE6, IE7.
The error text says "Expected object".
the IE debugger points to "noop_checkconditions()" as the error source.

noop_checkconditions() is missing in the page.

Additional Information

In my opinion, since the questions are in same group we enter a code branch where the textarea wants the group conditions checked under onkeyup=""
The presentation being question-by-question causes some javascript to be lacking, because the group logic is not useful during question-by-question

hence the textarea wants the checks, the survey doesn't give the checks implementations.

here is the patch I coded, that is simply adding the definition of noop_checkconditions() in one ELSE branch. The IF branch was already setup to implement it
(Well, it's a void function, but IE still need the implementation for not throwing that Expected object nag)

--- question.php.orig 2010-02-08 14:49:51.000000000 +0100
+++ question.php 2010-02-08 14:51:20.000000000 +0100
@@ -472,6 +472,9 @@
echo "\n\n<!-- JAVASCRIPT FOR CONDITIONAL QUESTIONS -->\n";
echo "\t<script type='text/javascript'>\n";
echo "\t<!--\n";

  • echo "function noop_checkconditions(value, name, type)\n";
  • echo "\t{\n";
  • echo "\t}\n";
    echo "function checkconditions(value, name, type)\n";
    echo "\t{\n";
    echo "\t}\n";
TagsNo tags attached.
Bug heat0
Complete LimeSurvey version number (& build)8278
I will donate to the project if issue is resolved
Browser
Database type & versionmysql 5
Server OS (if known)debian
Webserver software & version (if known)apache
PHP Version5.1.6

Users monitoring this issue

There are no users monitoring this issue.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2010-02-08 15:16 apps New Issue
2010-02-08 15:16 apps Status new => assigned
2010-02-08 15:16 apps Assigned To => user372
2010-02-08 15:16 apps LimeSurvey build number => 8278
2010-02-08 15:16 apps Database & DB-Version => mysql 5
2010-02-08 15:16 apps Operating System (Server) => debian
2010-02-08 15:16 apps Webserver => apache
2010-02-08 15:16 apps PHP Version => 5.1.6
2010-02-13 17:15 c_schmitz Assigned To user372 => lemeur
2010-02-13 17:15 c_schmitz Status assigned => closed
2010-02-13 17:15 c_schmitz Resolution open => fixed
2010-02-13 17:15 c_schmitz Fixed in Version => 1.87+