Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flot + thickbox 3 iframe #15

Closed
GoogleCodeExporter opened this issue Apr 14, 2016 · 7 comments
Closed

Flot + thickbox 3 iframe #15

GoogleCodeExporter opened this issue Apr 14, 2016 · 7 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. make link <a
href="?blah=123&KeepThis=true&TB_iframe=true&height=400&width=600"
class="thickbox">test</a>
2. click on the link
3. couse javascript error

Original issue reported on code.google.com by marcis.p...@gmail.com on 13 Dec 2007 at 5:15

@GoogleCodeExporter
Copy link
Author

Would you please try debugging it?

Otherwise please provide a test page to allow someone else to try.

Original comment by olau%iol...@gtempaccount.com on 13 Dec 2007 at 6:50

@GoogleCodeExporter
Copy link
Author

Here some example:

http://marcis.info/temp/flot/

Original comment by marcis.p...@gmail.com on 18 Feb 2008 at 2:35

@GoogleCodeExporter
Copy link
Author

tried the same example with flot 0.4. the same error ;/

Original comment by marcis.p...@gmail.com on 13 Mar 2008 at 2:29

@GoogleCodeExporter
Copy link
Author

I went to that page and it casts an exception: "Invalid dimensions for plot, 
width =
0, height = 0". This means that the placeholder object hasn't got the 
dimensions set
at the time where you try to do the plot.

In your case this is probably because the placeholder is hidden (display:none) 
at the
moment you call $.plot. You need to refactor your code to prevent this. I don't 
know
what thickbox is doing so I can't tell what would work best, but a quick fix 
would
perhaps be to just wait a short moment with setTimer().

In short: this is not a Flot bug as the canvas _must_ have its dimensions set 
before
Flot can do anything.

My apologies for it taking so long. I can recommend using the mailing list in 
the
future - in fact there was a discussion today about the same kind of problem. 
It's
available like a web forum with the Google Groups web interface.

Original comment by olau%iol...@gtempaccount.com on 13 Mar 2008 at 4:43

  • Changed state: Invalid

@GoogleCodeExporter
Copy link
Author

I did a couple of tests, and I'm beginning to think that the problem isn't that 
the
placeholder is hidden at the moment you call $.plot but rather that the DOM 
isn't
ready yet. It's just a theory, but it might be related to the fact that you 
doing the
plot inside an iframe.

I found this link which might help:

http://ideamill.synaptrixgroup.com/?p=6

Original comment by olau%iol...@gtempaccount.com on 14 Mar 2008 at 10:40

@GoogleCodeExporter
Copy link
Author

Hm, did some more testing. The results seem to contradict what I just said.

Original comment by olau%iol...@gtempaccount.com on 14 Mar 2008 at 12:52

@GoogleCodeExporter
Copy link
Author

Original comment by dnsch...@gmail.com on 4 Jun 2012 at 2:39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant