Check out the LimeSurvey source code on GitHub!

Multiple question types in array Internet Explorer

6 years 4 months ago #49989 by sociolog

I finally got the Multiple question types in array workaround to work in Chrome and Firefox with my questionnaire. Unfortunately, Internet Explorer doesn't show it like it should(see attached pictures). Can you help me get it to show correctly on IE6,7,8? I am giving you the URL and the Javascript code I used (adapted from this workaround ).

In Internet Explorer the boilerplate questions appear doubled, with each double having a smaller font red coloured text, and I don't understand why. This whole thing messes up the layout. Please give me some pointers as to how I can fix this.


Test questionnaire is here (second page, size of table depends on value entered in I2):

Script can be downloaded from here:

Table in Firefox

Table in IE8

File Attachment:

File Name: sript.txt
File Size:0 KB

Please Log in to join the conversation.

6 years 4 months ago #50089 by sociolog
I did some debugging. I made a smaller table and tested it with Internet Explorer 7. The error is not because of the modified default template, it appears in the default template to. Introducing tpartner's code one command at a time, I narrowed the problem down to this part of the code:

// Wrap each row in a div
// This is kinda verbose but IE won't let me use jQuery shortcuts
var el = document.createElement('div');



Apparently, when this code is run, in Internet Explorer it goes from state A to state B (see pictures attached). Each row appears as a column before its elements, so the elements appear twice with that small red font. After running all the code after the wrapping part, it goes to state C, with the doubles still showing. This doubled code does not appear in Firefox or Chrome, where the table looks great.

Do you have any idea why this happens and how to make Internet Explorer not show these doubled cells?

State A (before the wrapping):

State B (just after the wrapping) - Variable names and brackets inserted with Photoshop for a better undestanding:

State C (at the end):

Exported questionnaire:

Javascript code inserted in first boilerplate(b0):

Please Log in to join the conversation.

6 years 4 months ago #50103 by tpartner
You have a span in your banner element that's not closed properly and the resulting HTML error may be messing up IE.
<h2><span style='font-size:26px;font-family:"Times New Roman"; color:#003366' >SocPiMu10</h2>

Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

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