You need to sign in to do that
Don't have an account?
lopezc
how to redirect my window parent from an iframe?
Hi,
I need to display a VF page on the home page (I am overwriting the task component). For this I have create a HTML homepage component and use the iframe tag pointing the src attribute to my VF page, to make this I use an s-control. Example:
However I have a problem with this. In my VF page a have a buttom "new"
to be able to create a new Task. But because I am in an iframe the new
page is download in the iframe. I have tried with this:
But when I click on the buttom it doesn't do anything, I am always in the same page.Any ideas?
Thanks!
I need to display a VF page on the home page (I am overwriting the task component). For this I have create a HTML homepage component and use the iframe tag pointing the src attribute to my VF page, to make this I use an s-control. Example:
Code:
<IFRAME src="/apex/myTasks" width="100%" height=400 frameborder="no"> </IFRAME>
Code:
<apex:commandButton onclick="JavaScript: parent.location.href ='/00T/e—retURL=%2Fhome%2Fhome.jsp';" value="New" id="theButton"/>
Thanks!
I think this should do, right?
Message Edited by Sam.arj on 09-22-2008 08:51 AM
Thanks for your fast reply! I tried to do what you sujested but when I click on the input an error message is displayed in the console:
javascript is not defined
Do you know what is happening now?
Let me if works.
Many Thanks Sam!
You can do it like explained above iff the iframe is under the same domain as the main page otherwise look into
/support/api/{version}/interaction.js
There is a screenPop method that does this.
Documentation can be found in the open cti documentation.
Note: I have had problems with this if the iframe is reloaded when the main page hasn't been by changing the iframe src value.
Thanks
Baroukh Ovadia