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
dev_forcedev_force 

reRender an iframe using an actionFunction ?

Should an <apex : iframe> be re-rendered if its ID is specified in the reRender property of an actionFunction?

 

It does not seem to be working for me.

 

 

Thanks

Best Answer chosen by Admin (Salesforce Developers) 
lamayclamayc

This worked for me, I couldn't use an apex:iframe because it does not support the onload event, but as you can see, I rerender the outputPanel and I have not had any problems. I would suggest you try rerender something simpler first on your actionFunction just to make sure the ajax stuff is happening correctly. Once you verify that gets rerendered, then move to the iframe.

 

... 

<apex:actionFunction action="{!refreshNumbers}" immediate="true" name="refreshNumbers" rerender="numberOfItemsLeft, detail, table" oncomplete="checkIfNeedRefresh();"/>

</apex:form>

<apex:outputPanel layout="block" id="detail">

<iframe onload="addOnCompleteEvent();" id="editFrame" scrolling="no" src="{!detailPage}" height="3000" width="100%" frameborder="true"/>

...

 

 

All Answers

lamayclamayc

This worked for me, I couldn't use an apex:iframe because it does not support the onload event, but as you can see, I rerender the outputPanel and I have not had any problems. I would suggest you try rerender something simpler first on your actionFunction just to make sure the ajax stuff is happening correctly. Once you verify that gets rerendered, then move to the iframe.

 

... 

<apex:actionFunction action="{!refreshNumbers}" immediate="true" name="refreshNumbers" rerender="numberOfItemsLeft, detail, table" oncomplete="checkIfNeedRefresh();"/>

</apex:form>

<apex:outputPanel layout="block" id="detail">

<iframe onload="addOnCompleteEvent();" id="editFrame" scrolling="no" src="{!detailPage}" height="3000" width="100%" frameborder="true"/>

...

 

 

This was selected as the best answer
dev_forcedev_force

Hey thanks,

 

I needed to wrap the iframe tag in an output panel.

 

Odd, but I'll take it !