0
votes

Working on a webshop, and using fancybox to a quickshop type thing. My problem is that when user click "Add to basket" in fancybox, fancybox should close and refresh parent page. Using this:

$(".quickshop").fancybox({ 'autoDimensions' : true, 'width' : 798, 'height' : 480, 'autoScale' : true, 'scrolling' : 'true', 'type' : 'iframe', 'titleShow' : false, 'onClosed': function() { parent.location.reload(true); } });

And it does the trick, but it also reloads page when user just clicks the normal close button.

So is there any way to check if "Add to basket" link has been clicked, and only then reload page?

1

1 Answers

0
votes

This should work:

<a href="webshop.aspx" onclick="some actions">Add to basket</a>

Where "webshob.aspx" is a link to the page you have a fancybox on.