views:

28

answers:

2

I'm loading colorbox on page load.

parent.$.fn.colorbox({href: "#inline_example1", overlayClose:false, inline:true,width:'80%',height:'90%', onClosed:function(){} ,onLoad: function() { }});

I want to close the parent window when the colorbox is closed. Please tell me what should I write inside onClosed function.

A: 

Your question is not very clear what parent is but try something like:

window.opener.close();

or

window.close();

or

window.parent.close();

I hope one of these would help!!

Mouhannad
This code 'window.parent.close();' helped me.
Vinothkumar Arputharaj
A: 

In your onClosed handler, you could put:

window.close();
Steve Greatrex
I've tried it. But, not working.
Vinothkumar Arputharaj