Flot doesn't load in ASP.NET pages with a master page #89

Closed
dnschnur opened this Issue Sep 28, 2012 · 5 comments

Projects

None yet

1 participant

@dnschnur
Member

Original author: ronmicha...@gmail.com (December 09, 2007 02:39:07)

What steps will reproduce the problem?

  1. Insert sample code in an ASP.NET page with a master page
    2.
    3.

What is the expected output? What do you see instead?
Flot doesn't do anything, generates javascript error... looks like the
jquery.flot.js file was opened (threw a few alerts in it to test) but the
$.plot function doesn't get created properly so calls to it fail.

What version of the product are you using? On what operating system?
Tested in Firefox and IE.

Please provide any additional information below.
I pasted some of the sample code into a plain HTML in my ASP.NET project
and it worked. But when used within a page that has a master page, it
fails. Played with it a bit but coudln't figure out any reason for it.

Original issue: http://code.google.com/p/flot/issues/detail?id=10

@dnschnur
Member

From olau%iol...@gtempaccount.com on December 10, 2007 13:02:17
Did you remember to include jQuery before Flot? If you make the generated HTML source
available or send it to me at olau at iola.dk, I can probably tell you what's wrong.

@dnschnur
Member

From ronmicha...@gmail.com on December 10, 2007 14:20:11
Yep, definitely made sure to include jquery first. It's quite weird as its pretty
much exactly the same code as I had in a plain HTML page - which worked - but it
just stops working once ASP.NET renders it in a master page.

Here is a page where it won't work:
http://dev.geoinvesting.com/

Thanks.

@dnschnur
Member

From olau%iol...@gtempaccount.com on December 10, 2007 15:44:43
The problem is that jQuery is included twice. You have a couple of includes of
WebResource.axd?blahblah. One of those are jQuery. So when you include Flot, it
registers itself with jQuery and then jQuery is included again and overwrites the
previous registration.

Strange bug, it took me some time to debug. Hope this helps... :-)

@dnschnur
Member

From ronmicha...@gmail.com on December 10, 2007 15:54:49
Oh geez, I should have realized... duh! I'm so sorry. But thank you so much for
figuring that out!

@dnschnur
Member

From olau%iol...@gtempaccount.com on December 11, 2007 10:38:03
No problem, I'll close the bug now. I've just started a mailing list for the project
which I can recommend in the future.

@dnschnur dnschnur closed this Sep 28, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment