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
EPSWDEVEPSWDEV 

VisualForce pages and Iframe

I have a visual force page (call it VS1) with a custom controller(CS1). In VS1 I have a IFrame that opens a VS page (VSsub1). VSsub1 displays inputfields tied to a custom object.

Now My VS1 page has 1 button on it called save and upon clicking it I want to save my data (using the CS1). Problem is how do reference the custom object in the iframe in my CS1. Is it even possible.

If you are wondering why i am doing this - so keep a long story short I this VS1 page is used to generate page that on runtime changes the objects it displays. its part of a wizard and its the object type is selected on the previous page. and Yes I know record type does something similar however in our case we cant use it.

Thanks.
EricVlachEricVlach
Yes, it is possible, try passing the value to the parent window, which is the one holding the iframe - reference it using parent.document

-Eric