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:
- iFrame closes automatically.
- Parent window getting refresh automatically.
Please help me out.
After the form is submitted in Frame 1, you can use the following JavaScript to reload the parent frame:
Just simply simulate a click on the close button, like this:
Give form tag like this:
then after submit:
I would take a look at http://colorpowered.com/colorbox/core/example1/index.html
Specifically, look at "Example with Alerts"
open jquery.colorbox.js find these two pieces of code:
replace with these - note the addition of " window.location.reload();"