1.11M Members

textbox value to scriptlet

 
0
 
<form name="myForm" method="post">         
  <textarea id="commentarea"></textarea>         
  <input type="text" name="locate" value="<%=rs.getString("location")%>">         
  <input type="button" value="View Comment" onclick="getComment()">     
</form>   

function getComment(){   
  <% String locate=request.getParameter("locate"); %>   
  var location = "<%= locate%>";   
  document.getElementById('commentarea').value = location; 
}

I know this is the worst way to access it, but i need to access it in this way.
I want want the value of <%=rs.getString("location")%> to be the value of var location(in the javascript), i always get null, what should i do?

You
Post:
Start New Discussion
View similar articles that have also been tagged: