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
AkiTAkiT 

Iframe problems

Hi!

I use the below VF code to open an s-control in an iframe - similar result using custom button & s-control in standard sf page. However I cannot add the custom button in VF to get the same behavior.

So I use commadButton and return reference to new VF page with scontrol tag as in below code. However this is not as flexible - it is inline and static size. E.g. It does not react on sidebar collapse which is not nice. VF iframe tag doesnt seem to work as I cannot feed object id.

Any suggestions / workarounds?

Code:
<apex:page standardController="Offer__c" extensions="offerPage" tabStyle="Offer__c">

<apex:scontrol controlName="ListBtn" height="800" width="1000" subject="a06T0000001p2Q0"/>

</apex:page>
mtbclimbermtbclimber
What does your scontrol do?   What value does the Visualforce page wrapper provide to the scontrol, i.e. is the below your complete page markup? 
AkiTAkiT
The s-control contains form with some parameters like object id that comes from the scontrol tag subject parameter (in code example it's just fixed value) and server urls. This form is then posted onload which opens 3rd party application in an iframe.

My initial Visualforce page is a list of objects where user can pick one - id goes to scontrol tag subject. (wrapper is like wiki contact  example)

Initial page has commandButton which returns pagereference to the 2nd Visualforce page (above code) - this 2nd page shows the 3rd party app with reference to the selected object. Only thing is that I need to set static iframe size... Is there other way.. :smileyindifferent:


Message Edited by AT on 11-17-2008 08:36 PM
mtbclimbermtbclimber

AT wrote:
The s-control contains form with some parameters like object id that comes from the scontrol tag subject parameter (in code example it's just fixed value) and server urls.


You don't need an scontrol for this.


AT wrote:
This form is then posted onload which opens 3rd party application in an iframe.


See apex:iframe


AT wrote:
....Only thing is that I need to set static iframe size... Is there other way.. :smileyindifferent:


I don't understand. You are setting the static iframe size. Are you saying your values are ignored?
AkiTAkiT
Sorry maybe unclear with the last point...  I mean that there is no other way than setting a static iframe size. If I set e.g. 1000x800 it does not get wider when I collapse sidebar. The custom button / scontrol iframe gets wider when sidebar is collapsed.

apex:iframe shows url content. Can I use apex:iframe to show the response html from the form submission..?


Message Edited by AT on 11-17-2008 09:40 PM