-
Iframe help
Hello,
Not sure if this is the right section!
...So there are 3 domains involved, which I have access to. One of the domains I have a list of about 20 products with images, which id like to list on my other 2 domains.
Id like to iframe these products, as ill be updating the product list frequently.
Now im using the Lytebox plugin to display my images but just cant get it to work.. I've followed the instructions as followed :
"iFrames: If you plan to use Lytebox in an iFrame environment, then you need to include lytebox.css in the parent document, while including lytebox.js in the iFrame document"
But no luck.. Is it really not posible for lightbox to work within an iframe over different domains?
A friend mentioned something about an AJAX request, but I wouldnt know where to start.
So does anyone have an idea how I can acheive this? Hope I made some sense
Thanks!
-
-
You cannot do that cross domain. Even though you have access to all three domains, browser security restrictions prevent the cross domain scripting required to get this to work.
If you have PHP or some sort of server side language, you might be able to clone the product page on the fly - make an up to date copy of it on the current domain, present that in the iframe with lytebox showing on the top page.
But that's a bit beyond the scope of this forum unless you're already somewhat familiar with cloning pages on the server side. And that cannot be done if either of the domains restrict it. Since you presumably control all three - at least in theory that shouldn't be a problem. But it depends upon how they're set up and if not configured for this, if you have the access to change them.
Again though, unless you have some knowledge of cloning pages on the server side, it would be too complex to get into here.
Added Later:
It occurred to me that if you do clone the page, you may no longer need Lytebox, you could import the content directly to the 'top' page via PHP and/or AJAX and use any script you like for the Lightbox effect. There are so many.
Last edited by jscheuer1; 06-19-2011 at 03:39 PM.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks