Spida
Spida

Reputation: 73

Using fancybox to open a pop up HTML page

I'm just getting to grips with Fancybox, and have made it work ok opening a larger image from a thumbnail.

Now what I'd like to do, is open a pop up window page (HTML page) from a link within the parent window, so that the popup (child window) get the focus, and the parent page behind greys out until the child is closed again.

It's probably dead simple, like me...hope someone can help?

Cheers.

Upvotes: 7

Views: 72522

Answers (1)

Kurt
Kurt

Reputation: 1897

If I understand you correctly, Fancybox's website has an example: http://fancyapps.com/fancybox/#examples

Check out the iframe example. Basically set the href of your <a> tag to the page you want, and in the Fancybox JS, set type: 'iframe' (not necessarily required, but if Fancybox fails to correctly identify the type, you can set it manually this way).

Another example: http://jsfiddle.net/VWsRP/1/

Upvotes: 8

Related Questions