JQuery+Java setting field value with val() + single quote
- by Fabio K
I have a problem setting the value of a textarea element with jquery's val().
Basically, I have a JSP file which receives a string parameter called 'text'.
Java code:
String text = (String) request.getParameter('text');
Now I want my textarea element to receive this text:
Javascript code:
$('#textarea_id').val('<%=text%>');
It works…