0
   

Assigning Java varible value to Javascript varible

 
 
Reply Sun 20 Apr, 2014 01:03 pm
How to assign a java variable vale to an javascript varible. I have tried the following scripting elements:

<%
double x=23.35;
%>
var temp='<%= x %>';
var temp="<%= x %>";
var temp='${x}';
they returned an output as follows:

<%= x %>
<%= x %>
${x}

if the above scripting tags are used without quotes then they are not accepted.
Actually I am not working on an web application, but calling this jsp file from a java code. I am working on SWT browser for uploading google maps.
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Question • Score: 0 • Views: 1,911 • Replies: 0
No top replies

 
 

Related Topics

 
  1. Forums
  2. » Assigning Java varible value to Javascript varible
Copyright © 2024 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.1 seconds on 12/21/2024 at 07:55:33