'◆ 무한한 가능성 > & 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:page
controller=
"t"
>
02
<script>
03
function myJavascriptFunc()
04
{
05
alert(
'Entered Javascript'
) ;
06
CallApexMethod() ;
07
}
08
</script>
09
<apex:form
>
10
<apex:actionFunction
name=
"CallApexMethod"
action=
"{!myActionInController}"
onComplete=
"alert('After apex method') ;"
/
>
11
<apex:pageBlock
>
12
<apex:pageBlockButtons
>
13
<apex:commandButton
value=
"Hit Me"
onclick=
"myJavascriptFunc() ;"
/
>
14
</apex:pageBlockButtons
>
15
</apex:pageBlock
>
16
</apex:form
>
17
</apex:page
>
Class :
1
public
class
t
2
{
3
public
PageReference myActionInController()
4
{
5
return
null
;
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