I'm trying to pass a string argument to JavaScript function. for some reason, it can get only ints. I put here only the syntax of the string, since I know that this is the problem because it worls with int.
Code inside sending function:
String counter = "hey";
out.println("<script>parent.update(\'' + counter + '\')</script>");
out.flush();
Eventually I'd expect following update
function on my HTML page to be called with value of counter
as shown above:
<script>
function update(p) { alert(p); }
</script>
as I mentioned, the javascript file does alert when I send an int, but doesn't react when I send a string.