Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 353
Spida Avatar asked Nov 08 '12 22:11

Spida


1 Answers

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/

like image 148
Kurt Avatar answered Nov 01 '22 07:11

Kurt