I have a Wordpress and WooCommerce site for a client, and to create a little twist on the customizing on a product I have a external html-page opening in a FancyBox iFrame using Easy FancyBox plugin (http://wordpress.org/plugins/easy-fancybox/).

Now when the user is done with the form inside that iframe, which sends data using GET to the checkout form, I want the FancyBox to close and move the user to the cart/checkout page.

At least close the box and reload the page so that I can show the user a message that the product was added.

How would I do that? I'm rather new to this kind of stuff.

Do I need to ad some kind of jQuery/JavaScript to a file and then call it somehow from the submit button?


So this is what I did to make it work:

<form id="formid" name="form" action="/checkout" method="get">
    Text: <input type="text" name="text"><br>
    <a href="/checkout" target="_parent" onclick="document.getElementById('formid').submit();">Finish</a>
    <input type="hidden" name="mess" value=Finish />

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.