Timeline for How to trigger JQuery event when drop down select list is changed in CiviCRM?
Current License: CC BY-SA 4.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 13, 2018 at 12:48 | comment | added | Aidan♦ | @Darren Both answers were relevant to your original question given the limited information you provided. You need the right jQuery to work with select2, and you need to make it work in the CiviCRM context. You have the select2 documentation example which should take care of the jQuery part. Pradeep was showing you how to use the enclosure correctly for Civi and Naomi was talking about how you get your js added within Civi. These answers are also not just for your benefit but for those encountering similar issues. Just say what worked for you - no need to downvote. | |
Jul 13, 2018 at 8:57 | comment | added | Darren | @Aidan How are we supposed to get to the correct answer without voting down ones that don't answer the original question? | |
Jul 13, 2018 at 8:53 | comment | added | Darren | I've clarified that I know how to embed Javascript. | |
Jul 13, 2018 at 8:47 | comment | added | Darren | Well, the answer wasn't wrong, but doesn't answer the question peeps. Please edit the answer and I will vote it up (I can't vote up until it's edited). Sorry to offend, feel free to edit the answer. No offence mean't, just trying to focus discussion. | |
Jul 13, 2018 at 7:43 | comment | added | Aidan♦ | @Darren - you're not going to get much help on this site or from this community if you downvote anything that doesn't exactly solve your problem. No-one is obliged to help you but Naomi & Pradeep have kindly offered suggestions to help you resolve your issues. From your initial post it's not clear that your js is even being loaded or run. | |
Jul 12, 2018 at 20:10 | comment | added | naomi | I suggest you go have a look at the rules about downvoting! You are not supposed to vote down an answer just because you tried it and you couldn't get it to work. It is for answers that are irrelevant or bad quality. Pradesh and I both gave very sensible suggestions that were worth trying, even if they didn't immediately solve your problem. Mine even helped you along, just not all the way! The right thing to do in that case is post a comment and just not accept the answer as a solution. | |
Jul 12, 2018 at 19:14 | comment | added | Darren | Voted this answer down, as I was't having problems initiating JQuery. The question is how to trigger an event from the drop down list changing. | |
Jul 12, 2018 at 18:41 | comment | added | Darren | OK, that's now inserting the code in the right place, but still not detecting a change to the drop down list value.... I'll update the question with more details. | |
Jul 12, 2018 at 18:01 | comment | added | Darren | Thanks for that pointer, Naomi. Looks promising. Will report back. | |
Jul 12, 2018 at 16:44 | history | answered | naomi | CC BY-SA 4.0 |