Hi!
I need to separate the datasource for my grid in a separate user updatable data file, called "datasource.js".
I have placed the call to the src in the head and it fails totally in Komodo Edit. When I place the src call in the body, it works in Komodo, but not in the browsers (Opera and Chrome).
The data file looks like this:
var data = [{"picture": "EnviroPopulation99.png","TaxiName": "Andrew's Taxis","TaxiPhone": "01239 289617"},
{"picture": "Island Biogeography 99.png","TaxiName": "AllStar Taxis","TaxiPhone": "01249 241521"},
{"picture": "MarkandRecapture99.png","TaxiName": "TaxiCars","TaxiPhone": "01249 275141"},
{"picture": "Population Viability Analysis99.png","TaxiName": "01TaxiCabs", "TaxiPhone": "01249 275987"}];
var testdata = "Hello data!";
The code html file has the standard grid code calling data: data;
The test variable at the bottom of the file works fine.
Is there any reason why a data variable called from an external .js file using <script> would fail, please?
All the best,
Andrew.
I need to separate the datasource for my grid in a separate user updatable data file, called "datasource.js".
I have placed the call to the src in the head and it fails totally in Komodo Edit. When I place the src call in the body, it works in Komodo, but not in the browsers (Opera and Chrome).
The data file looks like this:
var data = [{"picture": "EnviroPopulation99.png","TaxiName": "Andrew's Taxis","TaxiPhone": "01239 289617"},
{"picture": "Island Biogeography 99.png","TaxiName": "AllStar Taxis","TaxiPhone": "01249 241521"},
{"picture": "MarkandRecapture99.png","TaxiName": "TaxiCars","TaxiPhone": "01249 275141"},
{"picture": "Population Viability Analysis99.png","TaxiName": "01TaxiCabs", "TaxiPhone": "01249 275987"}];
var testdata = "Hello data!";
The code html file has the standard grid code calling data: data;
The test variable at the bottom of the file works fine.
Is there any reason why a data variable called from an external .js file using <script> would fail, please?
All the best,
Andrew.