Problem whit Floatbox into a iframe html

Page: 1

Author Post
Member
Registered: Nov 2013
Posts: 5
HI!!

I 'm new in this, and no speak english, I speak spanish, so excuse the mistakes.

1) I hace a html with an "a href with floatbox", and it runs fine!

But, in other html, I include the html (1) into a "iframe" and the floatbox not runs, only show me the "a href" page without the effect...

How I code it to run it?

Thank you for your help,

Ivan.
Administrator
Registered: Aug 2008
Posts: 3382
Hi Ivan,

Please post a link to a page online that shows the problem and tell me where to find the problem on the page. I can debug a web page but I can't debug a statement that something is not working.

Thanks...
Member
Registered: Nov 2013
Posts: 5
Thank you!!

Now the page is offline because it's on developing stage and need the Floatbox for the production site (online). But,I can post the code:

prueba.html: it show me fine a new page with the Floatbox effects...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link rel="stylesheet" href="floatbox/floatbox.css"/>
<script src="floatbox/floatbox.js"></script>
</head>

<body>

<a href="index.php" class="floatbox" class="floatbox" data-fb-options="fb.parent width:800 height:800 contentScroll:true">click me</a>

</body>
</html>



prueba2.html: this page, show the "prueba.html" page into a "iframe", but, the effect only runs on the iframe,
which is the option for show the Floatbox effect in the all the "prueba2.html" page?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<iframe src="prueba.html" width="450" height="160" scrolling="yes" frameborder="no"></iframe>
<body>
</body>
</html>

Thank you for help!!

Ivan...
Administrator
Registered: Aug 2008
Posts: 3382
Sorry, I can't guess as to what the problem might be. I have to see the page. If you can't post it online somewhere (the page, not allegedly quoted HTML) I can't help.
Member
Registered: Nov 2013
Posts: 5
Here are two examples pages,

http://www.aquiescr.com/floatbox/prueba.html

It show a page with a "click me" link, and that link haves the foatbox effect and runs fine!!

But, in this one

http://www.aquiescr.com/floatbox/prueba2.html

Floabox not run, and, when I put the pages online, appear this line:

<fbtrash id="fbTrash" style="display: none;"></fbtrash>

On locahost, prueba2 show me the effect into the iframe, but online not show nothing,

I don't know what happen...

Help me,

Thank you
Administrator
Registered: Aug 2008
Posts: 3382
Thanks for the example.

prueba2.html contains only an iframe that shows prueba.html. The click me link is in the prueba.html document inside the iframe. You have the floatbox files included in the child iframe document, but you don't have the floatbox files included on the parent document. In an iframe hierarchy, the include lines must be present on each document, including the base or top document.

Here's the relevant quote from the Instructions:
Quote
When using Floatbox on a page that has same-domain iframes which contain floatbox-enabled content, the floatbox.js and floatbox.css files need to be included in the root (top) page and on the child iframe page(s). For example, if you have a page with iframes nested two deep and floatbox content only in the deepest iframe, you need the floatbox files included in the deep iframe, the parent of that iframe, and the root document. This is how Floatbox is able to cover the entire top document when showing content originating from an iframe.


There is a minor secondary problem that you will encounter. The click-me link tries to show google.com as iframe content. Most 3rd party sites do not allow their pages to appear within iframes on other sites, and google is no exception. You can't display google.com within an iframe.
Member
Registered: Nov 2013
Posts: 5
It's true!!

I include the js and css files Floatbox on the parent and the child pages, and runs fine on online!!

But, I have the same pages and files on online and offline, and the Floatbox effect over prueba2 file only runs fine on online...

Some special do that?

The google reference was only a sample page, only for this sample, on developing environment, I reference to PHP file.

I updated the prueba and prueba2 files:

http://www.aquiescr.com/floatbox/prueba.html

http://www.aquiescr.com/floatbox/prueba2.html
« Last edit by isanchez on Mon Nov 04, 2013 5:27 am. »
Administrator
Registered: Aug 2008
Posts: 3382
Unfortunately my super powers don't extend to being able to diagnose a page that I cannot see. You're on your own for figuring out the problem with the offline page.
Member
Registered: Nov 2013
Posts: 5
Hahahaha... I asked it, but the important is that Floatbox runs fine on my online page...

Thank for your help!

I recommend the Floatbox!

Regards,

Ivan Sanchez.

Page: 1