Problems with a javascript on dropdownlist combined

Mehr
3 Jahre 7 Monate her #141127 von lfanfoni
Hi there.
I've adapted a script of Denis Chenu to define two dropdown list (italian provinces and towns).
This script run well in 2.05 version, but not in 2.50 version. You can test here the 2.50.
With firebug I've found errors on these statements:
1) answertextwidth=$(this).find("col.answertext").attr('width').replace("%","");
2) ddarrayseparatorwidth=$(this).find("col.ddarrayseparator").attr('width').replace("%","");

I hope you can assist me.
Luciano

Aiutaci a far crescere la comunità italiana di LimeSurvey: vai sul forum Italiano per richieste e soluzioni citando sempre la versione usata, non scrivere in privato, suggerisci modifiche o nuove traduzioni - www.limesurvey.org/forum/italian-forum/118441

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

LimeSurvey Partners
Mehr
3 Jahre 7 Monate her #141139 von steve_81
Hi,
could you please provide a .lss export of the question.
It's difficukt to debug without it.
Greets
Steve

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
3 Jahre 7 Monate her #141140 von lfanfoni
Here you can find the zip file of the question (2 MB)

Aiutaci a far crescere la comunità italiana di LimeSurvey: vai sul forum Italiano per richieste e soluzioni citando sempre la versione usata, non scrivere in privato, suggerisci modifiche o nuove traduzioni - www.limesurvey.org/forum/italian-forum/118441

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
3 Jahre 7 Monate her #141154 von steve_81
Hi,

sorry I was in a meeting, but here we go:

The adjusting of the width is the problem, but I can offer you a solution.
Change the script of Denis to this:
// Fix width of columns
			$(this).find("col.ddarrayseparator").attr('width',"2%");
			$(this).find("th.th-14").attr('width','50%');
			$(this).find("th.th-15").attr('width','50%');
			$("#question"+qID+" table.question tbody tr").each(...
Maybe its not as smart as the origin solution.

And a design issue: A little bit further down there is var NewSelectElement, ther you add class='form-control'. The line should look like this:
var NewSelectElement = "<select id='"+idNewSelectFilter+"' class='form-control'><option value=''>"+$("#"+idSelectFilter+" option[value='']:first").text()+"</option></select>";

Hopefully it works.
Folgende Benutzer bedankten sich: lfanfoni, mzzvtr

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
3 Jahre 7 Monate her #141172 von lfanfoni
Yes! It works on 2.50 and 2.05 too. Here the 2.50.
Thanks a lot!
Luciano

Aiutaci a far crescere la comunità italiana di LimeSurvey: vai sul forum Italiano per richieste e soluzioni citando sempre la versione usata, non scrivere in privato, suggerisci modifiche o nuove traduzioni - www.limesurvey.org/forum/italian-forum/118441
Folgende Benutzer bedankten sich: mzzvtr

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Jetzt loslegen!

Melden Sie sich jetzt an, und erstellen Sie in wenigen Minuten Ihre erste Umfrage.

Account einrichten

Abonnieren Sie unseren Newsletter

Abonnieren Sie unseren Newsletter für alle Neuigkeiten rund um LimeSurvey
captcha