You need to sign in to do that
Don't have an account?
close popup window when we click on outside popup window(urgent please)
Hi All,
Create one javascript button on contact , when we click on that button the popupwindow should be come.
And when we click on outside window popup window should be close.
I got some problm with my code , it doesn't work properly , plz cheak it...
{!REQUIRESCRIPT("/soap/ajax/8.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/15.0/apex.js")}
var url="/apex/commentspage?&id=" +" {!Contact.Id}";
newWin=window.open(url, 'Popup','height=500,width=600,left=100,top=100,resizable=yes,scrollbars=no,toolbar=no,status=no');
if (newWin.focus())
{
self.focus();
}
window.onblur=function()
{
newWin.close();
};
please solve my problm i can appriciate very much........
Thank you
I got solution for this one
window.top.close();
it's working now
thank you guys
All Answers
Hi instead of
write this :
Or this:
We have a free tool you can use for pop-ups it is located here. http://www.riptidecloud.com/products/popup-alerts
Hi Jitendra,
Thanks for you reply...
Both Are not Working .
If we click another tab it can work.
But if we click same window outside of popup it doesn't work at all.
Please make it guys,...
Hi,
Please find Working Sample HTML code:
Test.html
Test2.html
You can see, the code to close window is written on popup window itself.
Hi thank for you reply
I want to create javascript button..
We have write the code on
setup-->contact-->buttons and links
Javascript button
We have to write code here...
Please test it..
Hi,
If you can write small code in Child window page then your problem can be solved. However i tried to achieve but unfortunately i am not able to perform it. I have opened the thread at stackoverflow, let hope for answer there because it is actualy related to javascript.
http://stackoverflow.com/questions/11687375/close-child-window-from-parent-onblur-using-javascript
I got solution for this one
window.top.close();
it's working now
thank you guys
Thanks for sharing the solution.