[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1011
  • Last Modified:

Breaking fancybox out of an iframe

I have built a carousel (using jcarousel) which when you click an item uses fancybox to bring up the fullsize imge.  I need to offer this to third party websites by them inserting a few lines of code into their html.  I achieved this with an iframe wich calls a page with links to the relavent javascript css and images on our server.  Here is the problem... the fancybox lightbox needs to then breakout of the iframe to dim and be presented full size on the parent page.  This without being able to change code on the parent page.  This may not be possible?  If not how else could i offer the carousel simply to other websites?  Any help greatly appreciated - i'm pretty new at all this and well outside my comfort zone!
0
Kroidian
Asked:
Kroidian
  • 3
  • 3
1 Solution
 
OnthraxCommented:
That's not possible due to cross domain scripting restrictions.

What you could do is write a js file (let's call it client.js) that will dynamically create a div and iframe on the page when the page loads. In this iframe (which covers the entire window) you could load your external file. This would be possible as the client.js is on client server.

So all you client would have to do is include your client.js file in their page and all is set.

Hope this helps..
0
 
KroidianAuthor Commented:
Sounds perfect, i'll give it a go today and let you know how it goes.  Thanks for the help.
0
 
KroidianAuthor Commented:
Nice one, js strikes again
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
OnthraxCommented:
If my solution worked for you, you should accept my post as the answer instead of closing it as PAQ. :)
0
 
KroidianAuthor Commented:
Sorry, hadn't closed one before - hope this is correct
0
 
OnthraxCommented:
No worries :)

The question is correctly closed now. Thanks! :)
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now