Using colorbox:
http://colorpowered.com/colorbox/
Im using this to open a window up using the iframe function in colorbox. In the popup window/iframe I have a form. What Im trying to achieve is when the form is submitted I want the colorbox window to close and the parent window to refresh. Can anyone help me with this? Here is the code Im using now, when I manually close the colorbox window the parent page refreshes, but how do I tell the page inside the colorbox popup to close colorbox?
jQuery(document).ready(function(){
jQuery(".purchasepop").colorbox({width:"80%", height:"80%", iframe:true,
onClosed:function(){ location.reload(true); }});
});
Ok got it to work, was referencing the wrong "variable" as I am using noconflict to load jquery. This worked:
parent.jQuery.fn.colorbox.close();
I used the following code to close my the color box on my cancel button click event.
jQuery(document).ready(function () {
jQuery("#<%= btnCancel.ClientID %>").click(function () {
parent.jQuery.colorbox.close();
});
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With