Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8567357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T17:51:56+00:00 2026-06-11T17:51:56+00:00

I have the following test project in jsFiddle jsFiddle which runs as expected and

  • 0

I have the following test project in jsFiddle jsFiddle which runs as expected and JSLint reports code is valid.

I then copy and paste the html into a blank text file in Notepad and save as randomfilename.html

When I click the html file, I see the file chooser and I can select the file but the chart doesn’t render. Any ideas why? I’ve tried in IE, Chrome and Firefox and there’s no chart in any of them.

Thank you

EDIT: This is what I now have in a text file named randomfilename.html

It’s not working in

Chrome 21.0.1180.89 m or the latest firefox/IE for me?

<!DOCTYPE html>
<html>

<script src="http://code.highcharts.com/stock/highstock.js"></script>
<script src="http://code.highcharts.com/stock/modules/exporting.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<input type="file" id="files" name="file" />
<div id="container" style="height: 500px; min-width: 500px"></div>
<div id="testString"></div>

<script>

var dataString = new Array (
[1341187200000,592.52],[1341273600000,599.41],[1341446400000,609.94],[1341532800000,605.88],[1341792000000,613.89],[1341878400000,608.21],
[1341964800000,604.43],[1342051200000,598.90],[1342137600000,604.97],[1342396800000,606.91],[1342483200000,606.94],[1342569600000,606.26],
[1342656000000,614.32],[1342742400000,604.30],[1343001600000,603.83]);

function handleFileSelect(evt)
{
    var files = evt.target.files; // FileList object

    for (var i = 0, f; f = files[i]; i++)
    {

        var reader = new FileReader();
        reader.onload = (function(reader)
        {
            return function()
            {
                var contents = reader.result;
                document.getElementById('testString').innerHTML=contents;
                var gx;   
                gx=dataString;            
                renderChart(gx);  
}    
        })(reader);

        reader.readAsText(f);
    }
}



function renderChart(data) {
        // Create the chart
        window.chart = new Highcharts.StockChart({
            chart : {
                renderTo : 'container'
            },

            rangeSelector : {
                selected : 1
            },

            title : {
                text : 'AAPL Stock Price'
            },

            series : [{
                name : 'AAPL',
                data : data,
                tooltip: {
                    valueDecimals: 2
                }
            }]
        });
    };


document.getElementById('files').addEventListener('change', handleFileSelect, false);
</script>
</html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T17:51:57+00:00Added an answer on June 11, 2026 at 5:51 pm

    I think you’re forgetting to include the jQuery library. When using a jsFiddle, it allows you to specify a JS library to be included automatically in your HTML (that you don’t physically see). When you copy/paste your HTML from jsFiddle, the jQuery library including is not copied over. Try adding something like:

    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
    

    right above the other <script> tags (ONLY in your text file you copy/paste to…you don’t need to do this in jsFiddle because it’s automatically “done”).

    Not that this will break it, but you’re also missing a <head> and <body> section in your HTML. I’m not sure if HTML5 makes this optional, but you might want to add those. Even if <head></head> is empty, it should be included…and all of your code inside of the current <html></html> should be inside of a nested <body></body>.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have following piece of code from my Backbone project: App.Controllers.Test = Backbone.Router.extend({ routes:
I have the following code: CATextLayer *test = [CATextLayer layer]; test.string = summary; test.wrapped
I have the following test using NMock which fails. It used to work when
I have following query in my project, $values = array(test=>value) $this->_db->update(tablename,$values,array('id = ?'=> $data['id'],'wid
I have a test project for my actual code that resides in another project.
I have a (.NET 4) test project which references (the .NET 4) NSubstitute.dll. When
I have the following test inside a project targeting .NET 4.0: [TestFixture] public class
I have following test.pyx cdef public class Foo[object Foo, type FooType]: cdef public char*
I have following test class @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = {/services-test-config.xml}) public class MySericeTest { @Autowired
suppose I have following test/ Main.py test/one/ One.py test1.txt test/two/ Two.py test2.txt What I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.