<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[[TM] Change selector with JS]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">I have a problem using JS to change my selector value.<br />
It's supposed to be as simple as that : <a href="https://www.w3schools.com/JSREF/tryit.asp?filename=tryjsref_select_value" rel="nofollow ugc">https://www.w3schools.com/JSREF/tryit.asp?filename=tryjsref_select_value</a></p>
<p dir="auto">When I do it, the selection changes well but it's weirdly visible only if I clic on the button, the text doesn't change.<br />
<img src="/assets/uploads/files/1592398087936-d3db5677-d963-4b8a-ae2f-907b0ddbd76f-image.png" alt="d3db5677-d963-4b8a-ae2f-907b0ddbd76f-image.png" class="img-responsive img-markdown" /><br />
(I ofc tried to print the value in the console, it changed indeed)</p>
<p dir="auto">You can try it here :<br />
<a href="https://www.2speak.com/hero2" rel="nofollow ugc">https://www.2speak.com/hero2</a><br />
You can clic on any "Ce pack m'intéresse" button and see the result</p>
<p dir="auto">Thanks <img src="https://community.appdrag.com/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=lfk1vimvd74" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" title=":)" alt="🙂" /><br />
Best regards,</p>
]]></description><link>https://community.appdrag.com/topic/142/tm-change-selector-with-js</link><generator>RSS for Node</generator><lastBuildDate>Fri, 07 Aug 2026 11:46:28 GMT</lastBuildDate><atom:link href="https://community.appdrag.com/topic/142.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 17 Jun 2020 13:00:33 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [TM] Change selector with JS on Thu, 18 Jun 2020 07:28:16 GMT]]></title><description><![CDATA[<p dir="auto">That was new to me !<br />
Thanks a lot sorry for bothering you ^^"</p>
<p dir="auto">Good day,<br />
Best regards</p>
]]></description><link>https://community.appdrag.com/post/418</link><guid isPermaLink="true">https://community.appdrag.com/post/418</guid><dc:creator><![CDATA[Pierre SULPICE]]></dc:creator><pubDate>Thu, 18 Jun 2020 07:28:16 GMT</pubDate></item><item><title><![CDATA[Reply to [TM] Change selector with JS on Thu, 18 Jun 2020 07:12:27 GMT]]></title><description><![CDATA[<p dir="auto">Hello Pierre,</p>
<p dir="auto">As you can see it's not a deafult html select element but a Select2 (<a href="https://select2.org/getting-started/basic-usage" rel="nofollow ugc">https://select2.org/getting-started/basic-usage</a>)</p>
<p dir="auto">To make it update its value when you change it you have to manually trigger the change event after updating the select value:</p>
<pre><code>$("#yourSelect").val("yourvalue");
$("#yourSelect").trigger("change");
</code></pre>
]]></description><link>https://community.appdrag.com/post/415</link><guid isPermaLink="true">https://community.appdrag.com/post/415</guid><dc:creator><![CDATA[Wassim]]></dc:creator><pubDate>Thu, 18 Jun 2020 07:12:27 GMT</pubDate></item></channel></rss>