Your quoting seems to be off. Try something like:
<script type="text/javascript">
function redirectUser() {
var url = '<%= response.encodeURL("http://www.mysite/index.jsp?switch="+ intvariable) %>';
window.location.href = url;
}
</script>
<!-- more code -->
<input type="button" value="Copy" onclick="redirectUser();">
~s.o.s~
Failure as a human
11,938 posts since Jun 2006
Reputation Points: 3,281
Solved Threads: 734