Skip to main content

Posts

Showing posts with the label jsp-tags

How to send a Javascript variable to server side?

I must add items to an existing code, but I do not know all the patterns established. I need to retrieve a value from a numeric field in javascript, store it in a JSP tag variable and submit it to a Java method. I know javascript is client side and the server-side Java. This is a numeric field "ZONE" whose value must be recovered for a loop The added code is input "ZONE", the Action buton "ADD_ELEMENT_LISTE_OUVERTE_1" and the variable and loop "zone". thanks ! JSP-side code: <popo:form> <div class="left"> nombre de colonnes <input type="number" id="zone" name="zone" class="text" maxlength="25" valeur="" /> </div> <div class="right"> <%controller.getContext().getInteger(ListeOuverteContributionDetailController.ZONE) =%> <script type="text/javascript"> function get