Welcome, Guest
Username: Password: Remember me

TOPIC: Multiple question types in array Internet Explorer

Multiple question types in array Internet Explorer 4 years 1 month ago #49989

  • sociolog
  • sociolog's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 10
  • Karma: 0
Hello,

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 docs.limesurvey.org/tiki-index.php?page=...stion_types_in_array).

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.

Yours,
Vlad

Test questionnaire is here (second page, size of table depends on value entered in I2):
sas.unibuc.ro/sociologpepiatamuncii/index.php?sid=12847&lang=ro

Script can be downloaded from here:
www.esnips.com/doc/b83aa23f-a426-4b4a-95...454f7878/sript-table

Table in Firefox


Table in IE8

File Attachment:

File Name: sript.txt
File Size: 0
The administrator has disabled public write access.

Re:Multiple question types in array Internet Explorer 4 years 1 month ago #50089

  • sociolog
  • sociolog's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 10
  • Karma: 0
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');
el.setAttribute('id','inlineWrapper1');
document.body.appendChild(el);
$('div[name="qRow1"]').wrapAll($('#inlineWrapper1'));

el.setAttribute('id','inlineWrapper2');
document.body.appendChild(el);
$('div[name="qRow2"]').wrapAll($('#inlineWrapper2'));

el.setAttribute('id','inlineWrapper3');
document.body.appendChild(el);
$('div[name="qRow3"]').wrapAll($('#inlineWrapper3'));

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:
www.esnips.com/doc/306c4961-ed3a-4a62-a4...1d473b26/test_survey

Javascript code inserted in first boilerplate(b0):
www.esnips.com/doc/470c062f-e6d6-4a38-96...3e9690d93/TABEL-BUN2
The administrator has disabled public write access.

Re:Multiple question types in array Internet Explorer 4 years 1 month ago #50103

  • tpartner
  • tpartner's Avatar
  • NOW ONLINE
  • LimeSurvey Team
  • Posts: 4369
  • Thank you received: 829
  • Karma: 381
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>
Cheers,
Tony Partner

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

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.201 seconds
Donation Image