We're a community of 1.1M IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,080,703 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

textbox value to scriptlet

<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?

1
Contributor
0
Replies
1
View
joannamanez
Newbie Poster
1 post since Dec 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page generated in 0.0987 seconds using 2.7MB