Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Column width in an array

Re: Column width in an array 1 year 4 months ago #96438

  • StuTheQ
  • StuTheQ's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 26
  • Karma: 0
Dear Tony,

Thank you for helping me out yet again.
Since the introduction of Expression Manager, you must leave a space after opening and before closing curly braces or the contents of the brace will be parsed by EM.
I'd come across that while rereading the manual after upgrading to LimeSurvey 2.00+ but, of course, hadn't realised that this was the problem here... :blush:

When I first copied and pasted the corrected script that you gave me, it didn't seem to modify the column widths as specified. I looked at the script carefully again and think that this line
// Align the answer text - feel free to experiment
		$( 'div#question{QID} table.question tbody th' ).css({'text-align':'center'});
doesn't contain the space after and before curly brackets that you referred to. I added the appropriate spaces and the script subsequently worked fine (but I'm not sure if this made a difference or not).

(By the way, I just replaced {QID} with the question ID; is {QID} a specific JavaScript function? :unsure: I Googled it but didn't really find a clear explanation)

I discovered that this script also works well with Array Dual Scales (with 'default' and 'basic' templates, at least), effectively making it possible to adjust the width of the separator column (it just requires a bit of playing around with the column width % until you get the array layout that you want). I'd already looked for this topic and found this post #94288 (Topic: array dual scale: change width of separator), which looked promising, but finally didn't seem to result in a clearcut workaround. I'm going to add a new post to this topic thread later because I'd like to see if there are also other workarounds possible (with CSS, perhaps).

Regards,

Stu
Last Edit: 1 year 4 months ago by StuTheQ.
The administrator has disabled public write access.

Re: Column width in an array 1 year 4 months ago #96459

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4207
  • Thank you received: 791
  • Karma: 360
...is {QID} a specific JavaScript function?
{QID} is an Expression Manager variable that returns the question ID - manual.limesurvey.org/Expression_Manager#Access_to_Variables
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.
The following user(s) said Thank You: StuTheQ
  • Page:
  • 1
  • 2
Moderators: ITEd
Time to create page: 0.096 seconds
Donation Image