How to pass jquery value result into visualforce code for example:
My jquery code is
$j('[id$=submit]').on("click", function(){
var output = [], $jselects = $j(".container .row .span6 #form-details select"), i;
for (i=0; i < $jselects.length; i += 2)
output.push($jselects.eq(i).find("option:selected").text() +
":" + $jselects.eq(i+1).find("option:selected").text());
})
When i click this id, the output values are generated like b:b,s:s,a:a This values are stroed in to variable as output
Here my visualforce code
<apex:commandButton id="submit" action="{!myMethod}" value="Submit" styleClass="btn btn-primary" reRender="block">
<apex:param name="myParam" value="output"/>
</apex:commandButton>
When I press the id submit
, get the output value from jquery and it will be set in the place of output
in <apex:param name="myParam" value="output"/>
this line.
Here the output text are generated, but I need to know how send that value inside this <apex>
code.
Is it possible or not...?
Appreciate for your answer...