Bug: removes iframes, even if type is not set to iFrame

1,270 views
Skip to first unread message

mike nicholaides

unread,
Sep 12, 2011, 3:10:29 PM9/12/11
to fancybox
I'm using Fancybox to display HTML content that happens to have an
iframe in it. When fancybox closes, it removes the iframe, which
prevents it from displaying it the next time the user clicks the link.

To fix this bug, in line 946, I changed:

content.find('iframe')

to

content.find('iframe#fancybox-frame')

Thanks,
Mike

JFK

unread,
Sep 15, 2011, 3:13:47 PM9/15/11
to fancybox
very interesting
I will run further tests and suggest a fix for this issue in a future
release
other related posts and workarounds
http://groups.google.com/group/fancybox/browse_thread/thread/d7321b9a4df5b20b/
http://groups.google.com/group/fancybox/browse_thread/thread/1fd249d5f2bbd88e/

On Sep 12, 12:10 pm, mike nicholaides <mike.nicholai...@gmail.com>
wrote:

Gilma Izaguirre

unread,
Jul 13, 2012, 1:12:34 AM7/13/12
to fanc...@googlegroups.com
Hi... i have a little trouble using php, form and iframe of fancybox. The first, I did a query of my database and use while to did a repeater, next i called a iframe (various3) with fancybox, on the iframe i called a little form. Now the trouble, the call works only with the first result of WHILE in the case 2, 3.... etc don't works,

I to know when use iframe, needs create one VARIOUS on the script to each call (a href...) but in this case the result of WHILE maybe bring me infinite results and it's imposible create infinite scripts VARIOUS to each result.

Can you helpme, every idea it's welcome! THANKS !!!

Jan Wilson

unread,
Jul 13, 2012, 8:33:36 AM7/13/12
to fanc...@googlegroups.com
Are you using an id as a selector? If so, each HTML element (such as
<iframe>) needs to have its own unique id. If you have more than one
element, you should use class instead of id. You can have many elements
with the same class. This is basic HTML and CSS, having very little to
do with Fancybox.

If it is something else, a link to your page, or to a test page
somewhere that demonstrates the problem would be helpful.

--
Jan Wilson


On 07/12/2012 11:12 PM, Gilma Izaguirre wrote:
> Hi... i have a little trouble using php, form and iframe of fancybox. The
> first, I did a query of my database and use while to did a repeater, next i
> called a iframe (various3) with fancybox, on the iframe i called a little
> form. Now the trouble, the call works only with the first result of WHILE
> in the case 2, 3.... etc don't works,
>
> I to know when use iframe, needs create one VARIOUS on the script to each
> call (a href...) but in this case the result of WHILE maybe bring me
> infinite results and it's imposible create infinite scripts VARIOUS to each
> result.
>
> Can you helpme, every idea it's welcome! THANKS !!!
>
> El lunes, 12 de septiembre de 2011 13:10:29 UTC-6, mike nicholaides
> escribi�:

Gilma Izaguirre

unread,
Jul 13, 2012, 1:50:35 PM7/13/12
to fanc...@googlegroups.com
Thanks to response... i'm new, and don't have some much expirience...any way.... 

I'm using ID as selector because the example with <iframe> say that... can you read my code... i write a little if can you help me... THNKS SOO MUCH!

//while($line= $paging->fetchRes()) { 
<a id="various5" href="pdestino.php?id=<?php echo $line ["id"]; ?>">
<img src="images/v/<?php echo $line ["img"]; ?>" border="none" width="136" height="110" />
</a>
}

El viernes, 13 de julio de 2012 06:33:36 UTC-6, linuxbz escribió:
Are you using an id as a selector?  If so, each HTML element (such as
<iframe>) needs to have its own unique id.  If you have more than one
element, you should use class instead of id.  You can have many elements
with the same class.  This is basic HTML and CSS, having very little to
do with Fancybox.

If it is something else, a link to your page, or to a test page
somewhere that demonstrates the problem would be helpful.

--
Jan Wilson


On 07/12/2012 11:12 PM, Gilma Izaguirre wrote:
> Hi... i have a little trouble using php, form and iframe of fancybox. The
> first, I did a query of my database and use while to did a repeater, next i
> called a iframe (various3) with fancybox, on the iframe i called a little
> form. Now the trouble, the call works only with the first result of WHILE
> in the case 2, 3.... etc don't works,
>
> I to know when use iframe, needs create one VARIOUS on the script to each
> call (a href...) but in this case the result of WHILE maybe bring me
> infinite results and it's imposible create infinite scripts VARIOUS to each
> result.
>
> Can you helpme, every idea it's welcome! THANKS !!!
>
> El lunes, 12 de septiembre de 2011 13:10:29 UTC-6, mike nicholaides
> escribi�:

Gilma Izaguirre

unread,
Jul 13, 2012, 2:27:17 PM7/13/12
to fanc...@googlegroups.com
JOHNPRO, thanks i try use CLASS instead of ID if anybody needs... 

$(".various5").fancybox({
'width' : '40%',
'height' : '60%',
'autoScale' : false,
'transitionIn' : 'none',
'transitionOut' : 'none',
'type' : 'iframe'
});

and call it 

<a class="various5"  ...> </a>
Reply all
Reply to author
Forward
0 new messages