d3.js / JSFiddle - loading .tsv data - javascript

I created a JSfiddle to collaborate on a project but I can't get it to run properly:
It's loading correctly the html/css elements
It's apparently running the .js code as the dimensions (960*500 px )of the result look correct to me
However it does not seem to load the dataEL.tsv file I attached as an external resource, and that I use in my code to load data via:
window.onload = function draw(data) {
d3.tsv("dataEL.tsv", type, function(error, data) {
(...)
=> Here is the link to the JSfiddle
Can you please help me load correctly the data in order to display the result?
It displays correctly on my personal server

I don't think jsFiddle.net lets you upload external resources other than referencing JS files.
If you open the Javascript console, or Developer Tools of your browser (F12 assuming you are on Windows and using IE/Chrome/FF) you see that you are getting a 404 not found error for the file dataEl.tsv:
Failed to load resource: the server responded with a status of 404
(NOT FOUND) http://fiddle.jshell.net/46yxnukv/2/show/dataEL.tsv
You could try a different site, or upload the file dataEL.tsv to an internet-accessible web server and then request it using the full URL instead of an URL on jsFiddle.net.

Related

Wikipedia api error for images when page is loaded locally

I created a simple web form that pulls a wikipedia article and renders it on the page: https://fiddle.jshell.net/isachenx/b223kth6/
Everything is fine in the fiddle, but when used locally, I get errors when the ajax request tries to get the thumbnail images from the wikipedia page.
The error in the console reads:
GET file://upload.wikimedia.org/wikipedia/commons/thumb/1/15/Paleis_op_de_dam.JPG/129px-Paleis_op_de_dam.JPG net::ERR_FILE_NOT_FOUND
How can I get the request to get the images correctly? Change file:// to https:// ? How?
I don't need the images, but I'd like the console to stop throwing me errors...

External javascript file not executing

The problem is that the following external javascript file is not executing:
<script src="//www.google-analytics.com/cx/api.js?experiment=YOUR_EXPERIMENT_ID"></script>
When I access the URL directly it downloads the file as f.txt
And when I copy/paste the content from the file then it's fully functional js and working as it should: creating cxApi object.
Got the snippet from: https://developers.google.com/analytics/solutions/experiments-client-side
Presumably you are testing using a local file.
i.e. the URL in your browser's address bar is something like file:///Users/you/Desktop/test.html
The relative URL //www.google-analytics.com/cx/api.js?experiment=YOUR_EXPERIMENT_ID then resolves to file://www.google-analytics.com/cx/api.js?experiment=YOUR_EXPERIMENT_ID, which does not exist.
You may see an error in the Console of your browser's developer tools. You should see one in the Network tab.
Test using a web server. Access your pages over HTTP
Then you will have something like http://localhost/test.html, and the URL will resolve to http://www.google-analytics.com/cx/api.js?experiment=YOUR_EXPERIMENT_ID, which does exist.

I can see a webpage on a local computer, but after uploading it the pictures don't appear

I try to use a template provided here:
http://themes.alessioatzeni.com/html/brushed/
Then, I downloaded the basic files and modified them for my purpose. It was OK. I didn't have any problem to see the pages on my computer. I tested it with Edge, Chrome, and Fire Fox. Everything showed it very well. Then, I uploaded all the files on my website:
http://hirophysics.com/japaneseusedcar/bahama-used-car.html
Then, there is no picture on the slider and also I cannot find the right and left arrows on the menu bar...
I checked if all the file are uploaded. I found everything on the server. I didn't use any foreign language...
Would someone possibly advise me where the problem is hidden?
Thank you very much!
Hiro
I would go with the typical reason: wrong url to a resource. Often, when you are launching the page locally you get a bit different url than on the server. And your errors show exactly that error
Failed to load resource: the server responded with a status of 404 (Not Found)
So check again, if the URL you provided is correct. And as I said, the URL might be different between local and server eventho folder looks exactly the same.
http://hirophysics.com/japaneseusedcar/_include/img/logo.png Failed to load resource: the server responded with a status of 404 (Not Found)
Try to use your resources with additional ".." before directory where they are (for example you have
_include/img/logo.png so try ../_include/img/logo.png)

Flash360 rotator giving Error 2032 on server

I have a flash rotators for a website i am doing for a client.
I am able to view and use them if i load them off my computer.
But as soon as i load them on to any of my servers and try to access them i am presented with an IO error 2032
Now i know this means it cant find the files it needs to load so i then changed all the links to absolutes when it was calling for the necessary files and i still get the error.
I have also checked all folder permissions and their all good.
I am at a loss to wht maybe the problem.
here is a link were i just put all the rotators up to view
http://honeyword.mybigcommerce.com/pages/Clickers
file structure
Mainfolder
Viewer
_html files (for each product)
_swfobject21.js
_expressInstall.swf
_ImageRotator.swf
_Products
__Folders(producname)
____config.xml
____Images
_____.png
any help would be appreciated.
thank you
It seems to be an error related to file or folder permissions: I get a 403 Forbidden error page when accessing the file in the error message directly (I copied the filename from the first of the error messages below the "checking..." field and just pasted it in a new browser window).

My lightbox script won't load

Hey I'm trying to get this lightbox script to work on a client site but I get this error '$ is not defined', I'm not well with JS so i was wondering if i could get some help, heres the site - http://www.petconnection.com/blog/.
Thanks, Antonio.
Here's the problem:
/res/javascript/lightbox/jquery.lightbox-0.5.js
Failed to load resource: the server responded with a status of 404 (Not Found)
/res/javascript/jquery/jquery-1.4.2.min.js
Failed to load resource: the server responded with a status of 404 (Not Found)
The page is trying to retrieve the JavaScript file that defines jQuery (hence $) but the server is replying with a 404 error. Either it's requesting the wrong URL, or the file has been deleted from the server — perhaps replaced by a new version of jQuery (1.4.2 is pretty old at this point, we're on to 1.5).
The order of those messages also indicates that you're (trying to) load the the lightbox script before the jQuery script. This is bad juju. Lightbox depends on jQuery, so you've got to load jQuery first.
Antonio, it doesn't look like either of your scripts are loading properly. Try linking directly (instead of relative links) or just double check the links you currently have.

Categories

Resources