Special characters breaking up on onchange
<p>I'm having a problem once again, and as you always helped me solve it, hence i'm here again.</p>

<p>In Joomla, we have created a website used for renting/bookings of Villa's with the portal Jomres.</p>

<p>Now in the backend, we can change the location of a Villa ofcourse, and this work with a dropdownbox with an onchange function.</p>

<p>Now here lies the problem, if we for example, click on: Cala d'Hort
Then in the inputfield(not writable) it comes as Cala d.
It breaks up everything after the apostrophe.</p>

<p>I've tried a bit with encoding or escaping characters, however it did not work.</p>

<p>The little Javascript that is behind this is:</p>

<pre><code> function stext(selectid, textid) {
     var select = document.getElementById(selectid);
     var selectvalue = select.value;
     var text = document.getElementById(textid);
     text.value = selectvalue;  
  }
</code></pre>

<p>And the HTML:</p>

<pre><code> &lt;select onchange="stext('select', 'town')" id="select" class="sbox"&gt;
</code></pre>

<p>Is there a way that it does not break and provides the full name instead of breaking it down?
Thank you in advance!</p>

<p>Jeroen</p>
