I am new to jQuery and ftl. The process I'm trying to achieve is to assign a checkbox value to a ftl variable. In my example the variable selectedValues
contains the necessary value which is to be copied into an ftl variable. Passing jQuery values to an ftl variable is possible.
Here is the example code I tried with:
<script type="text/javascript">
$(document).ready(function ()
{
var selectedValues="";
$checkedCheckboxes = $("input:checkbox[name=numbers]:checked");
$checkedCheckboxes.each(function () {
selectedValues += $(this).val() +",";
});
alert(selectedValues);
});
</script>
<#assign checkboxvalue=" ? "/>