0

I'm trying to modify an example in this website. I run this example on GoogleChrome, But the compiler or whatever it is, gives me the following error

"Uncaught ReferenceError: store1 is not defined".

in my browser, I type the following: localhost/helloext/index.html and I expected to see the result is, RadarFillExample as in the above mentioned website.

index.html Contains the following:

<html>
<head>
<title>Hello Ext</title>
   <link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all.css">
   <script type="text/javascript" src="extjs/ext-debug.js"></script>
   <script type="text/javascript" src="app2.js"></script>
</head>
<body></body>
</html>

app2.js Contains the sourceCode available in the above mentioned website.

And the files(index.html, app2.js and extjs directory) are located inside D:\xampp\htdocs\helloext\

Can anyone tell me how to fix this error, so that i can modify the code?

your help is appreciated

sha
  • 17,824
  • 5
  • 63
  • 98
Amr
  • 187
  • 1
  • 4
  • 11

2 Answers2

2

From the error message, its clear that your store named store1 is not defined.

The data store for the example comes from another file namely: example-data.js. Your application should have access to this file or you should define a store with proper data for plotting the graph.

Abdel Raoof Olakara
  • 19,223
  • 11
  • 88
  • 133
  • can u please tell me how did u know that there is a file named example-data.js because i tried to locate it but i could not find it – Amr May 19 '12 at 10:45
  • Have a look at the HTML source, apart from RadarFill.js you have the data js file. Here is the file you are looking for: http://docs.sencha.com/ext-js/4-0/extjs-build/examples/example-data.js – Abdel Raoof Olakara May 19 '12 at 12:50
1

It's been year but I faced this problem today and would like to share a solution.

Yes, you are missing the example-data.js file which is to be referenced from the HTML page. This .js file creates the data that is populated in the chart.

example-data.js can be found under extjs/examples/example-data.js. Note: extjs is the unzipped folder which you downloaded from sencha.com.

Michael Petrotta
  • 59,888
  • 27
  • 145
  • 179
heta shah
  • 11
  • 2