Why is "Download CSV" repeated in my charts dropdown? - highcharts

I can't figure out why Download CSV and Download XLS are repeated in my Highstock chart. Here are my links:
<script src="/Scripts/HighStock/highstock.js" type="text/javascript"></script>
<script src="/Scripts/HighStock/highcharts-more.js" type="text/javascript"></script>
<script src="/Scripts/HighStock/modules/no-data-to-display.js" type="text/javascript"></script>
<script src="/Scripts/HighStock/modules/boost.js" type="text/javascript"></script>
<script src="/Scripts/HighStock/modules/exporting.js" type="text/javascript"></script>
<script src="/Scripts/HighStock/modules/export-csv.js" type="text/javascript"></script>
Any help is appreciated.

I found my problem. I had a duplicate link to csport-csv.js in my html. It was hiding somewhere I didn't think to look. Once it was removed the chart displayed the expected choices.

Related

ASP MVC error when accessing http://localhost:59730/Controller/Index

I am experiencing an odd occurrence.
If I navigate to:
http://localhost:59730/Controller
I get served the correct page and it is displays everything correctly.
But if I navigate to:
http://localhost:59730/Controller/Index It loads the page but it doesn't seem to load any css or scripts?
Why would this be? It is essentially navigating to the same page? It must have something to do with asp.net mvc routing I think??
I have just dumped my references in the main layout file: (my plan to go and organise them at a later stage)
<script type="text/javascript" src="Content/Template/js/plugins/jquery-1.7.min.js"></script>
<script type="text/javascript" src="Content/Template/js/plugins/jquery.flot.min.js"></script>
<script type="text/javascript" src="Content/Template/js/plugins/jquery.flot.resize.min.js"></script>
<script type="text/javascript" src="Content/Template/js/plugins/jquery-ui-1.8.16.custom.min.js"></script>
<script type="text/javascript" src="Content/Template/js/custom/general.js"></script>
<script type="text/javascript" src="Content/Template/js/custom/dashboard.js"></script>
<script type="text/javascript" src="Content/Template/js/custom/tables.js"></script>
<script type="text/javascript" src="Content/Template/js/plugins/jquery.dataTables.min.js"></script>
Reference your contents (like js, css, images...) with Url.Content like this:
<script type="text/javascript" src="#Url.Content("~/Content/Template/js/custom/general.js")"></script>;

what is the proper persistence.js script order

What is the proper order for these scripts to be loaded?
This order has been the only one that I have found that properly populates the DB, however it throws the errors:
Uncaught Error: jQuery should be loaded before persistence.jquery.js
Uncaught Error: persistence.jquery.js should be loaded before persistence.jquery.mobile.js
I can re-order the scripts so that these errors do not appear, but I haven't found one that does not throw the errors && populates the DB correctly
Otherwise the DB is created correctly but when populating it, the entries are the default values instead of my custom iterated values
<head>
<script type="text/javascript" src="js/index.js"></script>
<script type="text/javascript" src="lib/persistence.js"></script>
<script type="text/javascript" src="lib/persistence.store.sql.js"></script>
<script type="text/javascript" src="lib/persistence.store.websql.js"></script>
<script type="text/javascript" src="lib/persistence.store.config.js"></script>
<script>//population and clearance of DB scripst </script>
</head>
<body>
<div class="app">...</div>
<script type="text/javascript" src="lib/persistence.jquery.js"></script>
<script type="text/javascript" src="lib/persistence.jquery.mobile.js"></script>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.js"></script>
<script type="text/javascript">
app.initialize();
</script>
</body>
Use the demo/index.html file in the persistencejs src to answer this question. It has the jquery scripts first and persistencejs second. Here in the order in the demo file:
<script src="http://code.jquery.com/jquery-1.4.4.min.js"></script>
<script src="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.js"></script>
<script src="http://code.google.com/apis/gears/gears_init.js"></script>
<script src="../../lib/persistence.js"></script>
<script src="../../lib/persistence.store.sql.js"></script>
<script src="../../lib/persistence.store.websql.js"></script>
<script src="../../lib/persistence.store.memory.js"></script>
<script src="../../lib/persistence.jquery.js"></script>
<script src="../../lib/persistence.jquery.mobile.js"></script>
Modify the order to use your own version and last I would loaded your database population script.

MVC Ajax with Ajax.ActionLink

I'm trying to create simple Ajax call, but after clicking the link I get a blank page with "Test" string in top left corner:
In my Details view I have:
#Ajax.ActionLink("test", "AddPositive", new AjaxOptions() { UpdateTargetId = "countDiv" })
<div id="countDiv">
</div>
In controller:
public string AddPositive()
{
String test = "Test";
return (test);
}
Action does get called.
In _Layout.cshtml I imported.
<script src="#Url.Content("/Scripts/MicrosoftMvcAjax.js")" type="text/javascript"></script>
<script src="#Url.Content("~/Scripts/MicrosoftAjax.js")" type="text/javascript"></script>
It's probably something really simple, but still cannot figure it out after going trough a few beginners tutorials for Ajax. Appreciate any help, thanks!
<script src="/Scripts/jquery-1.7.1.min.js" type="text/javascript"></script>
<script src="/Scripts/jquery.unobtrusive-ajax.js" type="text/javascript"></script>
<script src="/Scripts/MicrosoftAjax.js" type="text/javascript"></script>
<script src="/Scripts/MicrosoftMvcAjax.js" type="text/javascript"></script>
You are missing jquery and jquery.unobtrusive-ajax file.
Either there i bug in MicrosoftMvcAjax.js or M.S. has forgot to mention these files on their Tutorial. I hardly use this feature (#Ajax.ActionLink) so its tough for me figure out why it didnt worked without jQuery files.
You want to import two different .js files like so:
<script src="/Scripts/MicrosoftAjax.js" type="text/javascript"></script>
<script src="/Scripts/MicrosoftMvcAjax.js" type="text/javascript"></script>
Also, I could be wrong, but doesn't your Action need to return an ActionResult?

Jquery UI Grid scripts

Has anyone tried this grid yet? I would like to use it but I'm not sure where to start. I read this article but I have some questions. Maybe some of the experts here can help.
First big question is "how can I get a copy of the code". The article points to a source but it's on some MVC trunk and I don't know how I can download the example.
Next big question. The article points so scripts:
<link href="#Url.Content("~/Content/site.css")" rel="stylesheet" type="text/css" />
<link href="#Url.Content("~/Content/themes/base/jquery-ui.css")" rel="stylesheet" type="text/css" />
<link href="#Url.Content("~/Content/grid-datamodel.css")" rel="stylesheet" type="text/css" />
...
<script src="#Url.Content("~/Scripts/jquery-1.4.4.js")" type="text/javascript"></script>
<script src="#Url.Content("~/Scripts/jquery.tmpl.js")" type="text/javascript"></script>
<script src="#Url.Content("~/Scripts/ui/jquery.ui.core.js")" type="text/javascript"></script>
<script src="#Url.Content("~/Scripts/ui/jquery.ui.widget.js")" type="text/javascript"></script>
<script src="#Url.Content("~/Scripts/datamodel/dataitem.js")" type="text/javascript"></script>
<script src="#Url.Content("~/Scripts/datamodel/datasource.js")" type="text/javascript"></script>
<script src="#Url.Content("~/Scripts/datamodel/extractor-datasource.js")" type="text/javascript"></script>
<script src="#Url.Content("~/Scripts/datamodel/datastore.js")" type="text/javascript"></script>
<script src="#Url.Content("~/Scripts/datamodel/grid.js")" type="text/javascript"></script>
Where can I get these from?
It appears that all of the scripts being referenced can be found in the github branch link he includes.
You can download a zip file by clicking the Download Now link on the right side of the page.
you can also browse the source code (the live branch (within 10 min), and tags), and easily download multiple files:
http://view.jqueryui.com
specifically, you can view the grid, and demos:
http://view.jqueryui.com/grid/
http://view.jqueryui.com/grid/grid-spf/

Another! jqGrid question.. search not working

Same one as my previous question, but this time another problem - the search box doesnt appear when the search icon is clicked... it worked yesterday, but not any more!
http://sysport.co.uk/admin/grid/TEST.php
Should work the same as:
trirand.com/blog/jqgrid/jqgrid.html
Left hand side click new in 3.7 -> Multiple Search...
Really baffled me! It uses jquery-ui
It seems to me that you should change the list of the JavaScript files loaded from
<script src="js/jquery-1.4.4.min.js" type="text/javascript"></script>
<script src="js/jquery-ui-1.8.8.custom.min.js" type="text/javascript"></script>
<script src="js/jquery.jqGrid.min.js" type="text/javascript"></script>
<script src="src/grid.loader.js" type="text/javascript"></script>
to
<script src="js/jquery-1.4.4.min.js" type="text/javascript"></script>
<script src="js/jquery-ui-1.8.8.custom.min.js" type="text/javascript"></script>
<script src="js/i18n/grid.locale-en.js" type="text/javascript"></script>
<script src="js/jquery.jqGrid.min.js" type="text/javascript"></script>
or
<script src="js/jquery-1.4.4.min.js" type="text/javascript"></script>
<script src="js/jquery-ui-1.8.8.custom.min.js" type="text/javascript"></script>
<script src="src/grid.loader.js" type="text/javascript"></script>
The file i18n/grid.locale-en.js must be loaded before jquery.jqGrid.min.js. The file src/grid.loader.js on the other side contain the same files which are already included in the jquery.jqGrid.min.js plus i18n/grid.locale-en.js (see developer version of jqGrid). Including two versions of jqGrid can follow to unpredictable results.

Resources