LimeSurvey bug tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
04111Bug reports v1.xConditionspublic2010-02-08 15:162010-02-13 17:15
Reporterapps 
Assigned Tolemeur 
PrioritynormalSeverityblockReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version1.87 
Target VersionFixed in Version1.87+ 
Summary04111: IE throws errors "Expected object" when filling a text answer (that is conditional-driven)
DescriptionHow 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 InformationIn 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.
LimeSurvey build number8278
Browser
Database & DB-Versionmysql 5
Operating System (Server)debian
Webserverapache
PHP Version5.1.6
Attached Files

- Relationships

-  Notes
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 => ElMatador69
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 ElMatador69 => 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+


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker