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

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,438 • Replies: 0
No top replies


Related Topics

  1. Forums
  2. » Assigning Java varible value to Javascript varible
Copyright © 2021 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.03 seconds on 05/12/2021 at 01:46:06