Check out the LimeSurvey source code on GitHub!

Array question with answers in dropdown boxes

More
5 years 2 months ago - 5 years 2 months ago #70081 by Usapuka
Hi,

I did an "Array question with answers in dropdown boxes" in accordance with: http://www.limesurvey.org/en/forum/can-i-do-this-with-limesurvey/58190-array-question-with-answers-in-dropdown-boxes .
I am using 5 answers possibilities: in the first column you can see the 5 answers, in the second I hide one and in the third I hide two.

With Mozilla Firefox and Chrome the hidden answers are really hidden but with Internet Explorer there is an "empty space" in the space of the hidden answers. And these "empty space" can be selected, which is incorrect. Please see the screen shots:





What can I do, in order to really hide the answers using Internet Explorer?

Thank you in advance, best,

Gabriel
Attachments:
Last Edit: 5 years 2 months ago by Usapuka.

Please Log in to join the conversation.

More
5 years 2 months ago #70084 by Mazi
Seems like a browser issue. Are there any JS error messages? Which IE version are you using?


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

More
5 years 2 months ago #70093 by Usapuka
Mazi,

Thank you for your answer.

There is not an JS error massage.

I have the same problem with IE 8 and IE 9 (another computer). The "hide()" don't hide. I put a number in text('number') instead of '', and in Firefox and Chrome the number is hidden and not in IE.

Best,

Gabriel

Please Log in to join the conversation.

More
5 years 2 months ago #70117 by Mazi
I guess that there are differences between the browser on how they deal with the hide() option. This might be a jQuery related problem. Maybe Google has some further hints for you.


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

More
5 years 2 months ago #70132 by DenisChenu
Hello,

Why don't remove the option, hiding an option aren't the best solution, clearly I think FF make an error here (I'm not sure you can have a display:none on a option :)).

With remove() , it's clean for IE too.

Denis :)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
The following user(s) said Thank You: Usapuka

Please Log in to join the conversation.

More
5 years 2 months ago #70152 by tpartner
Denis is correct.

In the linked solution, this:
$('#question298 .answer_cell_00SQ002 option[value=5]').text('').hide();

Should be this:
$('#question298 .answer_cell_00SQ002 option[value=5]').remove();

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: Usapuka

Please Log in to join the conversation.

More
5 years 2 months ago #70157 by Usapuka
Thank you Denis and Tony,

Yes, "remove()" is the solution. I tried with IE 8 and 9 and works well.

Best,

Gabriel

Please Log in to join the conversation.

More
5 years 2 months ago #70168 by Mazi
Tony, does that problem show up for drop down lists only? Because we use the hide() function quite often under different circumstances.


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

More
5 years 2 months ago #70182 by tpartner
Yes, <option> elements are oddballs - they don't respond well to display:none in all browsers so they need to be removed from the DOM.

It can be a bit of a problem if you want to hide them and then dynamically show them again. In that case I use .clone() to store a copy of the dropdown to use for re-showing the option(s).

Cheers,
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.

More
5 years 2 months ago - 5 years 2 months ago #70190 by DenisChenu

tpartner wrote: In that case I use .clone() to store a copy of the dropdown to use for re-showing the option(s).

Yep,

Sometime i move() the select box, create another one and clone only the option i need after .... :side: and put a listener on the second select to update the first :blink: .


PS: What a pity, we don't have :hammer: smiley

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
Last Edit: 5 years 2 months ago by DenisChenu. Reason: pity :hammer:

Please Log in to join the conversation.

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