+ Start a Discussion
SS KarthickSS Karthick 

Reload a whole page in VF

Hi folks,
          Can anyone tell me how to reload or refresh a whole page after clicking a follow button on Visualforce Page?
My VFP as follows;
<script>
       funtion reload(){
           window.location.reload( true );
       }
   </script>
   
   <apex:repeat value="{!userList}" var="user">
      <apex:outputText value="{!user.Name}" /><chatter:follow entityId="{!user.id}" onComplete="reload();"/>
      
      
   </apex:repeat>

I have to reload the page after clicking either follow or unfollow button.
But the above code doesnt perform very well!

So What Ive to modify in that page?

Thanks in advance
Karthick
Best Answer chosen by SS Karthick
Naveen Rahul 3Naveen Rahul 3
<script>
      //funtion reload(){
       function reload(){
           window.location.reload( true );
       }
   </script>
   
   <apex:repeat value="{!userList}" var="user">
      <apex:outputText value="{!user.Name}" /><chatter:follow entityId="{!user.id}" onComplete="reload();"/>
      
      
   </apex:repeat>
   
   you missed the letter C in function.please see the highlighted and your previous code.now it  must be working.
just highlighted them.

All Answers

Naveen Rahul 3Naveen Rahul 3
<script>
      //funtion reload(){
       function reload(){
           window.location.reload( true );
       }
   </script>
   
   <apex:repeat value="{!userList}" var="user">
      <apex:outputText value="{!user.Name}" /><chatter:follow entityId="{!user.id}" onComplete="reload();"/>
      
      
   </apex:repeat>
   
   you missed the letter C in function.please see the highlighted and your previous code.now it  must be working.
just highlighted them.
This was selected as the best answer
SS KarthickSS Karthick
Thank you Naveen
Naveen Rahul 3Naveen Rahul 3
no problem karthick happy to help naveen_rahul my skype if you need any doubts you can ask me