Keti777 / dropdown-check-list

Automatically exported from code.google.com/p/dropdown-check-list
1 stars 0 forks source link

Won't work in an iframe #38

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Attempt to use the dropdowncheckbox in an iframe.

What is the expected output? What do you see instead?
It should work.  Instead, it is creating the control, but not populating.

Original issue reported on code.google.com by gtho...@gmail.com on 6 Nov 2009 at 5:55

GoogleCodeExporter commented 8 years ago
Can you please send a small html page where the problem can be reproduced? 
Thanks.

Original comment by adrian.tosca on 25 Nov 2009 at 11:05

GoogleCodeExporter commented 8 years ago
Hmm, I guess this is more of an issue inside Fancybox.  I assumed it was 
because of
the iframe, but after some testing, it looks like I was wrong.  If you could 
take a
quick look at it, I'd appreciate it.

Original comment by gtho...@gmail.com on 25 Nov 2009 at 5:40

Attachments:

GoogleCodeExporter commented 8 years ago
works ok in opera and chrome but not in ie
if you change index.html to include directly the iframe (without fancybox) like:

<iframe src="iframe.htm"></iframe>

it works ok in ie also. So definitely is a problem with ddcl and fancybox 
working together. 

Original comment by adrian.tosca on 27 Nov 2009 at 11:38

GoogleCodeExporter commented 8 years ago
I'm using Firefox, and using Fancybox, the dropdown renders, but there are no 
options.

Original comment by gtho...@gmail.com on 29 Nov 2009 at 11:36

GoogleCodeExporter commented 8 years ago

Original comment by adrian.tosca on 10 Dec 2009 at 9:16

GoogleCodeExporter commented 8 years ago
The problem is caused by the fact that $(document).ready does not really work 
the same 
for iframes as for the normal documents. The DOM elements are not initialized 
when 
ready is called. 

A simple (and not recommended) way to avoid this is to use a small timeout so 
instead 
of:

$("#i1").dropdownchecklist()

use:

setTimeout(function() {$("#i1").dropdownchecklist()}, 100);

A better way is to use something like frameReady plugin: 

http://ideamill.synaptrixgroup.com/?page_id=18

Original comment by adrian.tosca on 10 Jan 2010 at 5:07