Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Loretta Carpenter   on May 09 In Java Category.

  
Question Answered By: Vivian Ruiz   on May 09

Anything within <% ... %> tags are parsed and
executed on the server while javascript  runs on the
client machine. Now you could go the other way around
like this.

<% Integer testVar = new Integer( 1 ); %>

<script>
var test  = <%= testVar.intValue() %>;
</script>

<% Vector myVector = new Vector();
myVector.addElements( testVar ) ; %>

Share: 

 
 
Didn't find what you were looking for? Find more on Javascript variable in vector Or get search suggestion and latest updates.


Tagged: