function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ShotShot 

how to update field on visualforce page with using actionFunction or javascript

Hi guys, here is the case, i have some record with fields, which i show in table on the page. And lets say user update one of the fields, so i want to save time when he\she modified this record to some hidden field. So need somehow send id of the record to javascript and do this there or use somehow a actionFunction. Can you help me with some examples.
<script>
        function updateModifyAtField(questionId){
            ...update ModifyAt field here
        }
    </script>

<apex:actionFunction name="updateModifyAtField" action="..." rerender="form"/>

<apex:column headerValue="Name" >
   <apex:inputField value="{!question.Name}" onChange="updateModifyAtField()"/>
</apex:column>

<apex:column headerValue="ModifyAt" >
   <apex:inputField id="{!question.Id}"  value="{!question.ModifyAt}" />
</apex:column>

 
ShotShot
Here is some update, i tried to do this in this way, but no luck:
<apex:actionFunction name="updateQuestionAction" action="{!updateQuestions}" onComplete="alert('After apex method');" rerender="form"/>

<apex:commandButton id="updateQuestion" value="update" onclick="updateQuestionAction()" reRender="form" />

It doesnt show anything in page messages and im sure that method updates questions, 
when i change button parameter from onclick to action="{!updateQuestions}"

I also tried to add param to inputField: 
<apex:inputField value="{!question.Name}" onchange="updateQuestionAction()" />

The same, no luck :( Looks like actionFunction doesnt work