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
paul-lmipaul-lmi 

Prevent framing when using an inline S-Control

I have the need to implement a 3rd party form as an S-Control, but Salesforce forces this to be in an iFrame when it's added to the page layout.  This causes any landing page I send the user to to be loaded in that iFrame rather than the normal window.

I'd like to know if there's a way to either _not_ have my S-Control be boxed in an iFrame, or to break out of that iFrame when clicking a link/button inside it.

I do not have the ability to edit the code of the page they are landing on.
RexRex

Try

parent.window.location.href = http://www.google.com/;

you add this to your form which will change the url of the window. hope this helps.

paul-lmipaul-lmi
the problem is, if i change the parent location, all the code after that line is skipped after that line right?

i wonder if I can just change the parent location to a URL with the query string attached.

got me thinking, will report back shortly.
RexRex
Lets say if you are looking for is - after people submit a form you dont want the result page in an iframe or the same parent window. i would suggest open it in a new window. so the user will not have to go back to SF.
paul-lmipaul-lmi
well, normally i'd agree, however, the result page actually links back to the object they came from, so i'd like to keep it in the same window.  the result page actually supports running inside an SF tab well, but in order for me to have flexibility in the parameters i pass to that page via the form, i need to use an scontrol (and ugh, iframe).