You need to sign in to do that
Don't have an account?
venkata someswara rao vejju
How to call apex method from Java scipt
Hi
I have list of emails and related checkboxes in vf page my question is i want to send emails based on what i checked in check box after that i click on vf page button it will be send emails.but I am facing some problems how to call apex method from java script or any suggestions fro this ?
I have list of emails and related checkboxes in vf page my question is i want to send emails based on what i checked in check box after that i click on vf page button it will be send emails.but I am facing some problems how to call apex method from java script or any suggestions fro this ?
You can call Apex Method from JS by using @Remote Action or by using ActionFunction.
Refer the below link for Example:
https://developer.salesforce.com/forums/?id=906F00000008zaMIAQ
VF page: Method in Apex class:
Hope this helps.
<apex:pageblock>
<apeex:pageblocktable value="{!list}" var="emais">
<apex:column headerValue="All?">
<apex:inputCheckbox value="{!Id}" />
</apex:column>
<apex:column value="{!Email}">
</apex:pageBlockTable>
</apex:pageblock>
<apex:commandbutton action="{!action}" value="sendemails">
i am directly callinng action method in apex that's fine but once i click action button how can i get selected emails.Beacuse my commadbutton is placed after page block table so data is not getting so give me any suggestion
Regards,
Krishna.