Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:
  • Page:
  • 1
  • 2

TOPIC: Delete select options (dropdown list) via java script

Delete select options (dropdown list) via java script 1 year 10 months ago #112398

Got it! Thanks again.
The administrator has disabled public write access.

Delete select options (dropdown list) via java script 1 year 4 months ago #118226

  • nickwelhar
  • nickwelhar's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 1
  • Karma: 0
Check with........SPAM ? corelangs.com/js/progs/options.html Javascript Combobox
Nick
Last Edit: 1 year 4 months ago by DenisChenu.
The administrator has disabled public write access.

Delete select options (dropdown list) via java script 1 year 4 months ago #118228

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9254
  • Thank you received: 1319
  • Karma: 382
@nickwelhar ? Did you really read the question or you search a forum to put a link ?
Assistance on LimeSurvey forum and LimeSurvey core developpement are on my free time (Say thanks ?).
A bug not reported is a bug not corrected. | Please, read the documentation | La doc en français à besoin de vous
The administrator has disabled public write access.

Delete select options (dropdown list) via java script 4 months 5 days ago #133237

  • deejroamer
  • deejroamer's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 3
  • Karma: 0
@DenisChenu, Thank you for your amazing out of the box script. I just modded it a bit so that the CSS of the new select is same as it was for the original select.

Link Here

I am not sure how long link will be up so To do the same

Add this line
var classSelectFilter = $("#question"+qID).find("select").attr('class');

Mod this line
var NewSelectElement = "<select id='"+idNewSelectFilter+"' class='"+classSelectFilter+"'><option value=''>"+$("#"+idSelectFilter+" option[value='']:first").text()+"</option></select>";

I request DenisChenu to permanently add this tweak to help any future users. Not everybody has time to skim through forums like us.
A credit to me would be nice :)
Last Edit: 4 months 5 days ago by deejroamer.
The administrator has disabled public write access.

Delete select options (dropdown list) via java script 4 months 5 days ago #133248

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5062
  • Thank you received: 747
  • Karma: 227
Our manual is a wiki, so you actually can add this yourself and help the community. The credit will then be given automatically through the system (I think at the end of the page).
Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | Question Attributes | Workarounds

If you found this answer helpful and it saved you some time please consider a donation to the project to keep Limesurvey going!
The administrator has disabled public write access.

Delete select options (dropdown list) via java script 4 months 5 days ago #133256

  • deejroamer
  • deejroamer's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 3
  • Karma: 0
Oh, DenisChenu's Method is not updated in Manual.

I was just telling that the script DenisChenu has on his server (link he gave in the second post)
So that when somebody else uses his script he gets added benefits to CSS Retention.

I will try updating the wiki. Never done it before :P

@DenisChenu, Can I use your method to update the wiki?
Last Edit: 4 months 5 days ago by deejroamer. Reason: Asked DenisChenu for permission
The administrator has disabled public write access.

Delete select options (dropdown list) via java script 4 months 4 days ago #133258

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9254
  • Thank you received: 1319
  • Karma: 382
deejroamer wrote:
@DenisChenu, Can I use your method to update the wiki?
The script is free like a speech (and like a beer). Then yes , no problem.

I have to put it in git(hub|.framasoft|lab) with a clear MIT licence, when i do : i put the link here. I search for a way to do it in plugin (without need to deactivate XSS for user).

Denis
PS: MIT licence : keep copyright (mine and yours).
Assistance on LimeSurvey forum and LimeSurvey core developpement are on my free time (Say thanks ?).
A bug not reported is a bug not corrected. | Please, read the documentation | La doc en français à besoin de vous
The administrator has disabled public write access.

Delete select options (dropdown list) via java script 4 months 4 days ago #133259

  • deejroamer
  • deejroamer's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 3
  • Karma: 0
A'right, Works for me, if you need help doing it, don't mind asking. I am free before May, maybe we can make it work.
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: ITEd
Time to create page: 0.314 seconds
Imprint                   Data Protection Statement                  Revocation information and revocation form