You need to sign in to do that
Don't have an account?
Uday K
IFrame Issue
I am using iframe and giving vf page in that.In the vf page when when i am clicking to the save button it is going to the another page.but is calling the reference page in the i frame.How can i close the window which is containing the iframe and the open the referenced page in new tab.
<apex:page >
<apex:form >
<apex:commandButton value="Close" onclick="window.top.close()"/>
</apex:form>
</apex:page>
Thanks,
Uday
Hai Uday,
try to use this blow value on the onclick attributre
onclick="window.close();"
And also try using instead 'onclick' to 'oncompleate' attribute with same above value.
All Answers
Hi Uday,
First open the new window you want to open with followed syntax
After opening your required window close the iframe window by "window.close();"
So finally onclick you need to code as followed.
Give a try on this, let me know in case of any concerns you face.
Hai Uday,
try to use this blow value on the onclick attributre
onclick="window.close();"
And also try using instead 'onclick' to 'oncompleate' attribute with same above value.
Thanks everybody. its working with the following code.
onclick="window.open('http://www.crowdchronicles.com/thank-you','_blank');window.parent.close();" oncomplete="window.close()".
But i want the window to be closed after 5 min. can someone suggest.
Thanks,
Uday