13

I want to reRender "TopPanel" from javascript, is there any way to do this in visualforce ?

<apex:outputPanel id="TopPanel">
<apex:outputPanel>

<script type="text/javascript">
function CreateTabs()
{
    //rerenderCode for TopPanel
}
</script>
  • Can't you just simulate clicking on hidden commandlink or something like that that would have rerender="TopPanel" in it? I'd think twice before inspecting & emulating the request being sent when commandbutton/link is clicked and response parsed back... I suspect this code could change in future. – eyescream Nov 15 '12 at 22:18
30

This is what an actionFunction is for

<apex:actionFunction name="rerenderTopPanel" rerender="TopPanel" />
<apex:outputPanel id="TopPanel">
</apex:outputPanel>

<script type="text/javascript">
    function createTabs() {
        rerenderTopPanel();
    }
</script>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.