Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Content displayed at the bottom of the page for a split second

  • LSWipo
  • LSWipo's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 5 days ago #224492 by LSWipo
Please help us help you and fill where relevant:Your LimeSurvey version: LimeSurvey 3.0Own server or LimeSurvey hosting:Theme: test_theme (test_theme)==================

Hello, I am having an issue while displaying the pages in the survey. 

The content is first displayed at the bottom of the page for a very short time and then, the page is loaded correctly.       

Could you please try if you also face the same problem when taking the survey?

lab1.limequery.com/162112?lang=de

Do you know how can I avoid this?

Thanks! 

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 5 days ago #224494 by tpartner
I suspect it is because you have JavaScript workarounds but I'm not going to go through a survey with a bunch of mandatory questions.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: DenisChenu, LSWipo

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 5 days ago - 3 years 4 days ago #224503 by Joffm
And we do not know how you programmed these Job A - Job B questions.
Look as if you used some multiple text or something like that.

There is a - in my opinion - good working solution for this  (as prototype the "Apple - banana" example).
Which you find in my German tutorial "Gimmicks and..." (Chapter 11)
Two screenshots
 

 


Joffm

Ich habe auch im Moment keine Lust auf Englisch zu schreiben.

 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 3 years 4 days ago by Joffm.
The following user(s) said Thank You: LSWipo

Please Log in to join the conversation.

  • LSWipo
  • LSWipo's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 4 days ago #224531 by LSWipo
Thank you for your responses.

​​​​​​​Please see the attached lss export in case it helps to understand the issue.

 

File Attachment:

File Name: limesurvey...2112.lss
File Size:1,048 KB


 

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
3 years 4 days ago #224534 by DenisChenu
I don't look at lss,
But if you have javascript waorkaro_und using $(#question{QID}).hide() : best is to add hidden CSS class to the question directly.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The following user(s) said Thank You: LSWipo

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 4 days ago #224541 by Joffm
Hi,
the reason for this is rather obvious.
There are some question of type multiple text that contain javascript and are hidden by javascript.

And the javascript starts working "on document ready", meaning after the whole page is loaded.
Your page is rather long, so it takes a moment to load, to run the jacascript and then hide these question.
Therefore you see these multiple text questions for a moment,
And you hide them by ".hide()".
Better to hide by the css class "hidden"

You ought to relocate the expression that only calculate the content of the choice question to another group. 

Something else
You may put the code of all these separate questions into one "longer" mutiple text question.
Fill the array
Shuffle
Put the first two values into the first two subquestions
Shuffle
Put the first two values into the third and fourth subquestion
Shuffle
Put the first two values into the fifth and sixth subquestion
...

And if you code the subquestion "easy understandable" you can access the values vy
Q1_EXP1_1
Q1_EXP1_2
Q1_EXP2_1
Q1_EXP2_2
Q1_EXP3_1
​​​​​​​Q1_EXP3_2

Joffm
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: DenisChenu, LSWipo

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 4 days ago #224564 by Joffm
Only some remarks:

1. Some more words about the "longer" multiple text.
Like this
 

And also the other questions of this type, like "EXPRandHours", "EXPRandControl",...

You only have to extend the script 
Code:
        // Identify this question
        var thisQuestion = $('#question{QID}');            
        var input1 = $('input:text:eq(0)', thisQuestion);
        var input2 = $('input:text:eq(1)', thisQuestion);
        var input3 = $('input:text:eq(2)', thisQuestion);
        var input4 = $('input:text:eq(3)', thisQuestion);
        var input5 = $('input:text:eq(4)', thisQuestion);
// and so on
 
Code:
        // Only load random numbers once
        if($.trim($(input1).val()) == '' && $.trim($(input2).val()) == '' && $.trim($(input3).val()) == '' && $.trim($(input4).val()) == '') {
 
Code:
            shuffleArray(numbers);
            $(input1).val(numbers[0]).trigger('keyup');
            $(input2).val(numbers[1]).trigger('keyup');
 
            shuffleArray(numbers);
            $(input3).val(numbers[0]).trigger('keyup');
            $(input4).val(numbers[1]).trigger('keyup');
 
            shuffleArray(numbers);
            $(input5).val(numbers[0]).trigger('keyup');
            $(input6).val(numbers[1]).trigger('keyup');
// and so on

2. Then I saw that "EXPRandHours" is equally calculated in each group. So it should be sufficient to calculate it once before the Expriment starts.
There may be more of these calculations, e.g. "ActHours"
They all are calculated the same way, no matter for all random numbers from 1-7.

3. This is a really small thing.
In your nested IFs you write 
{if(Hours.NAOK <= 17, 15, if(Hours.NAOK >= 18 && Hours.NAOK <= 22, 20,if(Hours.NAOK >= 23 && Hours.NAOK <= 27, 25, if(Hours.NAOK >= 28 && Hours.NAOK <= 32, 30,if(Hours.NAOK >= 33 && Hours.NAOK <= 37, 35, if(Hours.NAOK >= 38 && Hours.NAOK <= 42, 40, if(Hours.NAOK >= 43 && Hours.NAOK <= 47, 45, if(Hours.NAOK >= 48 && Hours.NAOK <= 52, 50,if(Hours.NAOK >= 53 && Hours.NAOK <= 57, 55,60)))))))))}

You see, the IF-statement has the syntax "if(condition,TRUE part, FALSE part)"
{if(Hours.NAOK <= 17, 15, if(Hours.NAOK >= 18 && Hours.NAOK <= 22, 20,if(Hours.NAOK >= 23 && Hours.NAOK <= 27, 25, if(Hours.NAOK >= 28 && Hours.NAOK <= 32, 30,if(Hours.NAOK >= 33 && Hours.NAOK <= 37, 35, if(Hours.NAOK >= 38 && Hours.NAOK <= 42, 40, if(Hours.NAOK >= 43 && Hours.NAOK <= 47, 45, if(Hours.NAOK >= 48 && Hours.NAOK <= 52, 50,if(Hours.NAOK >= 53 && Hours.NAOK <= 57, 55,60)))))))))}

You see, "15" is the TRUE part of the first condition, the rest the FALSE part.
Therefore it is not necessary to use this AND construct:
if(Hours.NAOK >= 18 && Hours.NAOK <= 22

"Hours" is always greater than 17. Otherwise the first part of the IF-statement would have been TRUE.
So this is sufficient:
{if(Hours.NAOK <= 17, 15, if(Hours.NAOK <= 22, 20,if(Hours.NAOK <= 27, 25, if(Hours.NAOK <= 32, 30,if(Hours.NAOK <= 37, 35, if(Hours.NAOK <= 42, 40, if(Hours.NAOK <= 47, 45, if(Hours.NAOK <= 52, 50,if(Hours.NAOK <= 57, 55,60)))))))))}

Seeing this: Maybe you can use a formula instead of the multiple IFs.
Something like
{if(Hours.NAOK <= 17, 15, if(Hours.NAOK <=57, 5*floor((Hours.NAOK+2)/5),60))}
Not tested.

Joffm

 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: LSWipo

Please Log in to join the conversation.

  • LSWipo
  • LSWipo's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 1 day ago #224647 by LSWipo
Thank you for your responses and the suggestions for further improvements.

How can I hide the content by using the css class hidden? I could be sure about how this works.

Should I write hidden in the css class under Display or there is more that I should do?

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 1 day ago #224656 by tpartner

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: LSWipo

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 1 day ago #224658 by Joffm
Short answer: Yes.

But you may shorten the whole survey.

1. Create a group GCalc
Create all random numbers here, as I showed
 
calculate the Base questions (BaseHours, BaseTimeCommute, ... )
If you had coded the TimeCommute question like this
15: 15 Minuten
30: 30 Minuten
...
60  60+ Minuten

instead of
1: 15 Minuten
2: 30 Minuten:
The "BaseTimeCommute" wouldn't be necessary.

2. In your Experiment_Choice" Groups
a. create a (hidden) array(text)
b. create a (hidden) equation) that calculates everything and fills the array
c. show your table and the question
 

The salary is missing, because I did not understand the entire idea behind it.

Here the array
 

And you assign the cells of the array in your equation
Code:
{arResult2_ActHours_1=EXPBaseHours1.NAOK+ 5*EXPRandHours_E2x1.NAOK}
{arResult2_ActHours_2=EXPBaseHours1.NAOK+ 5*EXPRandHours_E2x2.NAOK}
{arResult2_ActHours_1=if(arResult2_ActHours_1.NAOK > 60, 60, if(arResult2_ActHours_1.NAOK > 14,arResult2_ActHours_1.NAOK, 15))}
{arResult2_ActHours_2=if(arResult2_ActHours_2.NAOK > 60, 60, if(arResult2_ActHours_2.NAOK > 14,arResult2_ActHours_2.NAOK, 15))}
{arResult2_ActHours_1=if(EXPRand_E2x1.NAOK== 1 or EXPRand_E2x2.NAOK== 1,arResult2_ActHours_1,EXPBaseHours1.NAOK)}
{arResult2_ActHours_2=if(EXPRand_E2x1.NAOK== 1 or EXPRand_E2x2.NAOK== 1,arResult2_ActHours_2,EXPBaseHours2.NAOK)}
 
{arResult2_ActCT_1=if(EXPCT_E2x1.NAOK == 1, "Ja", "Nein")}
{arResult2_ActCT_2=if(EXPCT_E2x2.NAOK == 1, "Ja", "Nein")}
{arResult2_ActCT_1=if(EXPRand_E2x1!=2 and EXPRand_E2x2!=2, ControlHours.shown, arResult2_ActCT_1.NAOK)}
{arResult2_ActCT_2=if(EXPRand_E2x1!=2 and EXPRand_E2x2!=2, ControlHours.shown, arResult2_ActCT_2.NAOK)}
 
{arResult2_ActCO_1=if(EXPCO_E2x1.NAOK == 1, "Ja", "Nein")}
{arResult2_ActCO_2=if(EXPCO_E2x2.NAOK == 1, "Ja", "Nein")}
{arResult2_ActCO_1=if(EXPRand_E2x1!=3 and EXPRand_E2x2!=3, Telecommute.shown, arResult2_ActCO_1.NAOK)}
{arResult2_ActCO_2=if(EXPRand_E2x1!=3 and EXPRand_E2x2!=3, Telecommute.shown, arResult2_ActCO_2.NAOK)}
 
{arResult2_ActDL_1=if(EXPDL_E2x1.NAOK == 1, "gelegentlich", "oft")}
{arResult2_ActDL_2=if(EXPDL_E2x2.NAOK == 1, "gelegentlich", "oft")}
{arResult2_ActDL_1=if(EXPRand_E2x1!=4 and EXPRand_E2x2!=4, if(Deadlines.NAOK==2,"oft", "gelegentlich"), arResult2_ActDL_1.NAOK)}
{arResult2_ActDL_2=if(EXPRand_E2x1!=4 and EXPRand_E2x2!=4, if(Deadlines.NAOK==2,"oft", "gelegentlich"), arResult2_ActDL_2.NAOK)}
 
...

It is just a proposal.

Joffm



 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: LSWipo

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 1 day ago - 3 years 1 day ago #224659 by Joffm
Oh, the result is missing

 

Joffm

By the way:
Revise this condition in RandPay:
Code:
(
  (
    (EXP2ActHours1.NAOK <= EXP2ActHours2.NAOK) and
    (
      (
        (EXP2ActControl1.NAOK == "Ja") and
        [color=#ff0000](
          (EXP2ActControl2.NAOK == "Nein") or
          (EXP2ActControl2.NAOK == "Ja")
        )[/color]
      ) or
      (
        (EXP2ActControl1.NAOK == "Nein") and
        (EXP2ActControl2.NAOK == "Nein")
      )
    ) and
    (
      (
        (EXP2ActCommute1.NAOK == "Ja") and
     [color=#ff0000]   (
          (EXP2ActCommute2.NAOK == "Nein") or
          (EXP2ActCommute2.NAOK == "Ja")
        )[/color]
      ) or
      (
        (EXP2ActCommute1.NAOK == "Nein") and
        (EXP2ActCommute2.NAOK == "Nein")
      )
    ) and
...
The red marked parts are always true -> obsolete.
Code:
[color=#0000ff]        EXP2ActControl1.NAOK == "Ja"  or   (EXP2ActControl1.NAOK == "Nein" and EXP2ActControl2.NAOK == "Nein")[/color]

 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 3 years 1 day ago by Joffm.
The following user(s) said Thank You: DenisChenu, LSWipo

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 11 months ago - 2 years 11 months ago #224829 by Joffm
Though it is not related to the topic, here some - in my opinion - better solutions to ask for "Bruttolohn" and "Einheit".
To avoid your "three question solution"

1. "multiple numerical input" with some javascript to insert the drop-down.
 

 


2. Two questions ("numerical input", "list(radio)" with bootstrap-button-layout) joined with css classes "no-question" and "no-bottom"
 

3. Two questions ("array", "multiple short text") joined with some javascript.
 

And the warning included in the question text.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 2 years 11 months ago by Joffm.
The following user(s) said Thank You: DenisChenu, LSWipo

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose