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 stored into a variable as output
Here is 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 is generated, but I need to know how to send that value inside this <apex>
code.
Is it possible or not...?
Appreciate for your answer...