$('area').on('mouseover', function() {
var territory = $(this).attr('name');
var territoryString = new String(territory);
var owner = <%game.getTerritory(territoryString).getOwner().getName(); %>;
$('#selection').html(territory);
});
});
I'm trying to get the data from the Game object which I have stored as a JSP object. The territory I am trying to get is located within the game object as a list of territories. Is there a way to pass in the javascript variable as a parameter? Or do I need to make a JSP object with the list of territories?