I'm using jQuery ColorBox
to display a shopping cart item. When a user enters the quantity in the iFrame (opened with colorbox) and clicks on the submit button, I want the iFrame to be close and main window (parent) to be refreshed automatically.
I mean I want two things after submitting data on iFrame:
Please help me out.
use this on the parent window while opening iframe:
$(document).ready(function(){
$(".chpic").colorbox({width:"80%", height:"80%", iframe:true,
onClosed:function(){ location.reload(true); } });
});
and this to close the iframe inside iframe page:
parent.$.fn.colorbox.close();