PDA

View Full Version : Lytebox & iFrames



philnolan3d
08-17-2008, 01:42 AM
I initially used Lightbox but need it to work from within an iFrame, so I switch to Lytebox. It works, but the instructions for using it with iFrames don't make any sense. I've looked around at other threads about this problem but the answers seem to only have links to a page where it works. I understand that it works, I just don't know how. Any help would be appreciated. Here's what I've got:
(Click "3D Gallery " or "Photography)
http://www.philnolan3d.com/2008/index_2008.html

jscheuer1
08-17-2008, 10:49 AM
I know that it can sometimes be a little trickier than just this. But you must have:


<link rel="stylesheet" href="lytebox.css" type="text/css" media="screen" />

on the top page, you don't. The support forum is here:

http://www.dolem.com/forum/forumdisplay.php?fid=6

The FAQ:

http://www.dolem.com/forum/showthread.php?tid=61

But neither link is working at the moment, hopefully this is just temporary.

philnolan3d
08-17-2008, 07:24 PM
Unfortunately that wasn't it. Yeah I tried their forum multiple times over the past few days and even emailed them about it, but no luck. That's why I came searching for other forums like this one. Thanks anyway.

philnolan3d
08-17-2008, 10:17 PM
Problem solved. One of the guys from my old school looked into it and found I was missing
name="bodyFRAME"

in the iFrame tag.

jscheuer1
08-17-2008, 10:42 PM
I do recall that there are other, at least one other thing(s) that need to be done for this to work right. Unfortunately for you, I'm just about to leave for a much needed vacation, so will be a bit busy for the next few days. However, I will be online throughout much of my travels, so once I get on the road I may take a closer look at this. I did have this working in a bare bones installation with a slightly earlier version of lytebox. Here is my top page:


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<script type="text/javascript" src="lytebox.js"></script>
<link rel="stylesheet" href="lytebox.css" type="text/css" media="screen" />
</head>
<body>
<iframe name="DisplayFrame" src="t.htm" width="300" height="300" scrolling="auto" frameborder="1"></iframe>
</body>
</html>

Here is my enframed t.htm:


<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript" language="javascript" src="lytebox.js"></script>
<link rel="stylesheet" href="lytebox.css" type="text/css" media="screen" />

</script>
</head>
<body>
<a href="photo.jpg" rel="lytebox">Test</a>
</body>
</html>

I think the key is that your iframe must have a name, as mine does on the top page.

philnolan3d
08-17-2008, 10:48 PM
Well it's working now so I don't think there's any reason to look into it further.
http://www.philnolan3d.com/2008/index.html

I'm just going to download Safari now and check that, someone said there was a graphical problem in there anyway.

jscheuer1
08-17-2008, 11:05 PM
Lookin' good! I just tested in Safari 3 Win, looked good there too, though I may have missed one or more minor layout discrepancies. And Safari 3 (both for Win and Mac) is more compliant than earlier Safari versions, many of which are still in fairly wide use on the Mac platform.

philnolan3d
08-17-2008, 11:11 PM
Thanks, I checked it out with http://browsershots.org/ and it seems OK at least visually.

dhiman_pawan
09-01-2009, 12:38 PM
thanks its working for me also in IE 8 and mozila 3.