Parameter passing using Javascript+actionFunction in visualforce

In visualforce, there is a method for passing parameters from visualforce page to controller using javascript and actionFunction. Here is the example;

<script type="text/javascript">
function doSave(date) {

/*Action Function*/
<apex:actionFunction name="paraFunction" action="{!saveInterviewDate}" rerender="view">     
<apex:param id="aname" name="interviewDate" value="" />

/*Call the javaScript from here*/
<apex:commandLink onclick="doSave('{!$Component.interviewDate}');">               
<apex:commandButton value="Save"/>

/*get the parameter in controller*/
String interviewdate=Apexpages.currentPage().getParameters().get('interviewDate');


  1. Thanks for sharing your info. I really appreciate your efforts and I will be waiting for your further write ups thanks once again.
    Vee Eee Technologies

  2. Very helpful link.. Thank you for sharing it!

  3. Nice post...I look forward to reading more, and getting a more active part in the talks here, whilst picking up some knowledge as well..

    Pass Box manufacturers


Post a Comment

Popular posts from this blog

Displaying pop-up summaries on hover in visualforce