1

I wanted to use http://arborjs.org/atlas/ plugin ,but the plugin is not working in IE. Anyone knows any jquery plugin like arbor which will work in most browser and will be easy to use. I have a data which can be shown like atlas or graph. I wanted a jquery plugin which can easily do this job for me. I have downloaded the the arborjs codes but the demo provided in the zip file is not working in both IE and firefox.So I am thinking to drop this plugin for my work.Please let me know any plugin which can easily plot graph for me .

cereallarceny
  • 4,913
  • 4
  • 39
  • 74
Rajesh
  • 2,934
  • 8
  • 42
  • 71

1 Answers1

4

It doesn't work in IE because it's using the canvas element. Here's a solution for IE and Canvas.

You first need to download the library located on the link above and then upload the excanvas.js file to your server. Link to it using this code:

<!--[if IE]><script type="text/javascript" src="excanvas.js"></script><![endif]-->

You see above conditional comments (also called cond-com) which are only read by Internet Explorer. They check for the existence of Internet Explorer as the browser in use and then include the code in between. In this case, we link to the script we just downloaded (excanvas.js) and include it within the website. Remember, this will only include the script if the browser is Internet Explorer, which is perfect because we don't want users to download a script if they don't need to (if it's supported by their browser already).

To address the issue of your error "Failed to load script: /arbor.js (nsresult = 0x805303f4)" which I have also duplicated on my own system: the problem seems to be because you're loading a Worker javascript object. This specific object requires that the files in question be hosted either on a local server (through localhost) or through a live web server. The javascript libraries trying to be loaded are currently being loaded through your file structure on your computer, but the code in ArborJS requires these files be hosted in some nature, not just present in your system directory. Try putting everything on the Internet (again, either through a locally hosted server or through a publicly available server) and you should have better luck. Trying to run this script from the files on your computer will not work.

cereallarceny
  • 4,913
  • 4
  • 39
  • 74
  • ok..But I am not able to undertstand how this plugin works as the demo given in the download is not working in mozilla.can u tell me how to create a sample map using this plugin? – Rajesh Apr 07 '12 at 20:03
  • Can you rephrase what you're asking of me? I don't quite understand. A sample map? – cereallarceny Apr 07 '12 at 20:04
  • I wanted a sample code to prepare atlas structure using this plugin,can you please paste that code so that I will test that in both IE and FF and I will get an understanding as how this plugin works? – Rajesh Apr 07 '12 at 20:08
  • I will not write your code for you. Perhaps this link should help: https://github.com/samizdatco/arbor/tree/master/docs/sample-project – cereallarceny Apr 07 '12 at 20:12
  • cereallarceny, you may be missing the point of SO, which is to provide answers, not necessarily just a link. I think it's relevant to say "can you show me how the code you linked to would work with my case?", since it's entirely possible without verification on your part it may not. – Jared Farrish Apr 07 '12 at 20:16
  • I'm sorry Jared, but I disagree in this case. I answered the original question provided to me by Rajesh. He/She has the ability to not mark it correct if he/she chooses to. From my interpretation I saw no reason to rewrite 156 lines of sample code when the person who wrote the plugin has already done so in a well-documented manner. I provided a link because I felt it was a sufficient answer. – cereallarceny Apr 07 '12 at 20:24
  • Well... but previous to any comment, I almost commented that this was a very weak answer, as in, a comment under the question. You haven't provided an answer, simply something that may (if you *choose to visit that link*) lead to an answer. Link-based answers on SO are generally considered poor form; what if that link one day goes dead? There's no answer at this point. You should revise. – Jared Farrish Apr 07 '12 at 20:27
  • And if you doubt that I've been there, trawl through my answers, I think you'll see some responsiveness in terms of questions of context. `:)` – Jared Farrish Apr 07 '12 at 20:31
  • @ cereallarceny but the demo is not working right..i have already downloaded the project,but when I am executing index.html in firefox then I am getting following error in firebug Failed to load script: ../../lib/arbor.js (nsresult = 0x805303f4) – Rajesh Apr 07 '12 at 20:35
  • Jared, I've reformatted my answer accordingly. In the case of broken links, I see your point and won't argue it further. Rajesh, I am able to load the demo in Firefox, what version might you be using? – cereallarceny Apr 07 '12 at 20:40
  • @Rajesh: http://stackoverflow.com/questions/1549614/can-i-load-a-web-worker-script-from-an-absolute-url According to this post, they determined that the reason the script wouldn't load correctly is because they were trying to access data from a remote server. Is this the case for you? – cereallarceny Apr 07 '12 at 20:44
  • I have just downloaded the project and tried to run the demo provided in the project by doing a double click. to index.html I am using FF10.0 – Rajesh Apr 07 '12 at 20:52
  • @Rajesh: See the latest edit to my post. I feel you'll find it solves your problem, or at least diagnoses it. – cereallarceny Apr 07 '12 at 21:07
  • ok its working in ff,but not ie 9. added the excanvas.js file. IE is reporting error as SCRIPT600: Unknown runtime error Arbor, line 1 character 1 LOG: couldn't use web workers, be careful... SCRIPT438: Object doesn't support property or method '__defineGetter__' arbor.js, line 35 character 8042 – Rajesh Apr 07 '12 at 21:14
  • Did you host it online yet? The reason it wasn't working is because it wasn't hosted anywhere but simply existing on your computer. If you host it online somewhere I can better help you diagnose the issue from my end. – cereallarceny Apr 07 '12 at 21:18
  • ya I hosted it online on my local,now its working in ff ,but not in IE,I posted the error in my previous comment. I tried this option as well but its not working in IE: – Rajesh Apr 07 '12 at 21:29
  • 2
    If ExplorerCanvas did not work for you another suggestion would be Google Chrome Frame. https://developers.google.com/chrome/chrome-frame/ This wraps your entire HTML document in a Google Chrome-like environment allowing you to render Javascript and HTML5 elements exactly like Google Chrome. It's hard for me to diagnose every new problem you come me with if I can't see it for myself. Could you host it online please? – cereallarceny Apr 07 '12 at 21:32