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
Avinash RaviAvinash Ravi 

VF Page embedded into My site as iFrame

Hi All,

I have a VF form that I've embedded into my wordpress site. When someone fills it out and hits submit, the 'thank you' redirect url seems to open inside the same frame as the form (in the same parent page). Is there someway I can modify this to redirect from the form buttons to open into a new parent window?

Fill out the form or hit cancel in the below link and you'll see what I mean..

Please help!
Best Answer chosen by Avinash Ravi
You need to set the window.location to the thank you URL - you can't do this as part of a postback request, instead you have to do this client side using JavaScript. There's an example of this on my blog - its for Visualforce pages embedded in standard Salesforce pages, but should be straightforward to adapt: