0

I've searched quite a while for this problem but have not yet found a working answer.

What I have is the following. I open a lightbox with the following script. Within the lightbox is a link. When I click this link another page opens in the lightbox. The link also validates a form, and may only continue to the next page if it is validated. What I would like, is to resize the lightbox on load of the second page to width=900 and height=800.

Can someone help me?

    jQuery('.fancybox').fancybox({
        'type': 'iframe',
        'width': 640,
        'height': 680,
        'autoSize': false
    });
  • This may help : http://stackoverflow.com/questions/2429045/iframe-src-change-event-detection - once you've detected a change in the src of the iframe, you could then call a function to resize fancybox. – presidentnickson Apr 23 '14 at 09:40
  • The detection is not the problem. When I am on the new page, I want to do the resize, but can't get this to work. – user3258097 Apr 23 '14 at 09:58
  • You can use `afterLoad` method for that. In the function you can check `this.content.attr("src")` . If that value is equal to your link then do the resizing. – Batu.Khan Apr 23 '14 at 10:14

0 Answers0