+ Start a Discussion
Arun KArun K 

Rendering pageblock from visualforce remoting


I have a requirement where I need to render component from visualforce remoting.

If I would have used actionsupport instead of visualforce remoting, I can use rerender attribute to render certain pageblock.
I am wondering how to render pageblock on click of javascrip remoting value

I would create an actionFunction and then call the actionFunction from the JS method to rerender specific components


function jsRemotingFunction(){

// call JS Remote Method

// At end of method call ActionFunction



<apex:actionFunction name="refreshAF" rerender="theBlock"/>

Arun KArun K
Thanks for the reply.

It helped me. 
Now can I get the values in that rendered pageblock.

My requirement is I have a mpa where I need to click on zip whose values are coming from "javascrip remoting" and as you said I used "actionfunction" and could able to render popup. Now my requiremnt is "On click on the zip I need to get values in that pop".

                           function(result, event) {
                            adjacent = result
                            console.log("adjacent :- " + adjacent)
                            if (adjacent.toString() == 'true'){
                              var query = new esri.tasks.Query();
                              query.geometry = evt.mapPoint;
                              var deferred = zipcodes.selectFeatures(query,esri.layers.FeatureLayer.SELECTION_NEW);
                            //  zip_indicator()
                            alert("Selected zip is not adjacent ..please select adjacent zip")


<apex:actionFunction name="rerendAction" rerender="popup" action="{!showPopup1}" />
<apex:outputPanel id="popup" >
         <apex:outputPanel styleClass="popupBackground" layout="block"  rendered="{!displayPopUp}"/>
            <apex:outputPanel styleClass="customPopup" layout="block" rendered="{!displayPopUp}">
                <apex:outputtext value="zipname.name"/>