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
Big EarsBig Ears 

Passing values from one iframe to another

Dear all,

 

I'm looking to create a console-type screen for Campaign Members (combining both Leads and Contacts in one place) as it's something that my sales team have been asking for. I also think that it'll be a fun challenge for myself, and part of a larger "Outbound Prospecting" tab that I want to create for my team.

 

My main issues are that I don't know how to pass a value between iframes (i.e. if a lead in a table is clicked on, we get to see their record / details). Also, I'm trying to work out a way to get an action in the top frame to rerender the bottom frame, but can't work out the correct way to do so without causing a complete reload (which I think stops there being any chance of values being passed.

 

I know that this is a big topic, generally, but if anybody knows of any good resources/other threads on this board that are relevant, I would be very grateful.

 

With thanks,

Andy

Best Answer chosen by Admin (Salesforce Developers) 
DevAngelDevAngel

You can implement scrolling with div tags and proper styling.  I think the style attribute that controls scrolling is called "overflow". 

 

Cheers

All Answers

DevAngelDevAngel

Hey BigEars,

 

You might consider not using iframes but rather detail tags.  The Ajax samples in the documentation show the kind of master detail interaction that you explain in your post. 

 

If you are trying to use standard pages from a Visualforce or mini layouts I think you will find that you run in to the"same domain" security restriction because Visualforce pages are served up from a different domain than standard pages.

 

VF pages are at something like c.naX.visual.force.com and standard page are at something like naX.salesforce.com.  While you could certainly change the src of the iframe, you won't be able to communicate from the source of the iframe back to the VF page.

 

If the pages that you are framing are all VF pages, then the techniques described here should work for you.

 

 

Cheers

Big EarsBig Ears

Dave,

 

Thanks for your reply. I've seen the example in the documentation and find it useful for certain purposes. However, I'm really wedded to the need for the list of Campaign Members to be scrollable (rather than pageable) as there are so many people in each campaign. Do you know if I can have a scrollable window and detail tag below it? The issue would then become passing values from an i-frame (unless there's another way to implement scrolling) to the main page. Is that easier?

 

Thanks again,

Andy 

DevAngelDevAngel

You can implement scrolling with div tags and proper styling.  I think the style attribute that controls scrolling is called "overflow". 

 

Cheers

This was selected as the best answer
Big EarsBig Ears

DevAngel,

 

You are bloomin' brilliant. I'll check it out next week.

 

Andy