Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Parsing JSP variable into JavaScript

843836Mar 24 2005 — edited Mar 24 2005
Hi,

I am trying to parse a JSP variable into a pice of JavaScript code:
<%
some jsp code .....
String table_name=cols[0].toString();
%>
<script language="javascript">
var jsTemp = <%=table_name%>
alert ('jsTemp')
</script>
<%some more JSP....

This does not create an alert, any ideas why? Am I missing a quote/semi-colon somewhere?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 21 2005
Added on Mar 24 2005
7 comments
276 views