I'm using the code below to trim data to be sent to an SQL on a PHP page.
<script>$(function() {
$("#nameselect").change(function() {
$("#jobnoselect").load("getter.php?choice=" + $.trim($("#nameselect").val()).replace(' ', '+'));
$("#pagetable").empty();
});
});
</script>
Now it does work if the choice made is "Two Words" but if it is "Three Words Here" it does not and returns blank results. I'm not familiar with this language and another developer gave me this snippet a long time ago. Can anyone offer any help with it?