'◆ 무한한 가능성 > & Visualforce' 카테고리의 다른 글
| [Salesforce] useful sites (0) | 2018.09.06 |
|---|---|
| Salesforce Google Drive, External Data Source (0) | 2018.04.16 |
| [Salesforce] 수식 hyperlink 거래처 연결 (0) | 2017.02.10 |
| [Salesforce] wsdlGenFiles.jar for BulkAPI and SOAP API, salesforce api (0) | 2016.09.27 |
Here is the code :
VFP
01<apex:pagecontroller="t">02<script>03function myJavascriptFunc()04{05alert('Entered Javascript') ;06CallApexMethod() ;07}08</script>09<apex:form>10<apex:actionFunctionname="CallApexMethod"action="{!myActionInController}"onComplete="alert('After apex method') ;"/>11<apex:pageBlock>12<apex:pageBlockButtons>13<apex:commandButtonvalue="Hit Me"onclick="myJavascriptFunc() ;"/>14</apex:pageBlockButtons>15</apex:pageBlock>16</apex:form>17</apex:page>Class :
1publicclasst2{3publicPageReference myActionInController()4{5returnnull;6}7}As suggested by Bob you can also go with JavascriptRemoting, to know more visit this :
http://forceguru.blogspot.com/2011/06/summer-11-features-part-2-javascript.html
Thanks
Ankit Arora
Blog | Facebook | Blog Page