You need to sign in to do that
Don't have an account?
Rakesh Kumar
How can i submit a matix value at Controller(Apex code) using Javascript?
Hi All,
I wanna submit below matrix of all white and black circles at Controller side using javascript.
I tried one of code like
var success = sforce.apex.execute("NOV_TargetActionClass","submitStatus",{a:kmsID,b:targetID,c:status});
My process
Firstly i am collecting all circles (white & black) by using javascript and then i would like to submit all those recorde using above javascript method.
But its not working propertly.
My Matrix Data will be
Target Name | KM01 | KM02 | KM03 | KM04 | KM05 |
Target 1 | ● | ||||
Target 2 | 〇 | ● | |||
Target 3 | 〇 | ● | |||
Target N | 〇 | 〇 |
Is there any way to submit my collected value using javascript?
Please share your idea.
Thanks in Advance
Rakesh
I have solved my problem so i would like to share my solution..
Solution
instead of <apex:actionFunction .. >i just used <input type="hidden" name="paramList" value="" id="jsValue"/>
Controller
paramValue = Apexpages.currentPage().getParameters().get('paramList');
All Answers
Hi All,
This is my code...
Javascript code
function saveMePermanent(){
return "Please Save me";
}
VF Code
<apex:form>
<apex:pageBlock>
<apex:commandButton value="Save" onclick="doControllerSave(saveMePermanent())"/>
<apex:actionFunction action="{!submitStatus}" name="doControllerSave">
<apex:param assignTo="{!paramValue}" value="" />
</apex:actionFunction>
</apex:pageBlock>
</apex:form>
</apex:page>
Controller
String paramValue{get;set;}
public pagereference submitStatus(){
System.debug('submitStatus ****************** ');
paramValue = Apexpages.currentPage().getParameters().get('paramList');
return null;
}
Problem is that my apex code is also not invoking i dont know where am i Missing.
According to reference book i have written code but <apex:actionFunction ... > is not wokring properly.
Is there any idea or clue that i can keep out such problem?
Thanks
Rakesh
I have solved my problem so i would like to share my solution..
Solution
instead of <apex:actionFunction .. >i just used <input type="hidden" name="paramList" value="" id="jsValue"/>
Controller
paramValue = Apexpages.currentPage().getParameters().get('paramList');