Short question, I am sending ajax request after pressing a button. A string might contain & and if it does, everything after & is treated as a name of second parameter. I tried to use encodeURI(string) but it did not work. How to handle this properly?
My code without experiments:
<input class="refreshButton" type="button" value="refresh" onclick="$('#container').load('/some/path', {string: $('#string').val()});"/></td>
Cheers