How to encode javascript function -
how can encode parameters in javascript?
this function , parameter called newvalue
<script> function selectchanged(newvalue) { location.href="tester?restid=" + newvalue; } </script>
this how tried adeneos suggestion
window.location.href = "tester?restid=" + encodeuricomponent(newvalue);
but not work.
this getting:
tester?restid=38619
this want want
tester%3frestid%3d38619%21
function selectchanged(newvalue) { window.location.href = encodeuricomponent("tester?restid=" + newvalue); }
Comments
Post a Comment