JQPlot chart library program execution - jqplot

I am also trying the above code locally.
here is the code:
<html>
<head>
<script type="text/javascript" src="../JQuery/excanvas.js"></script>
<script type="text/javascript" src="../JQuery/jquery.js"></script>
<script type="text/javascript" src="../JQuery/jquery.jqplot.js"></script>
<script type="text/javascript" src="../JQuery/jqplot.categoryAxisRenderer.min.js"></script>
<script type="text/javascript" src="../JQuery/jqplot.barRenderer.js"></script>
<script type="text/javascript" src="../JQuery/jqplot.categoryAxisRenderer.min.js"></script>
<script type="text/javascript" src="../JQuery/jqplot.canvasTextRenderer.min.js"></script>
<script type="text/javascript" src="../JQuery/jqplot.canvasAxisLabelRenderer.min.js"></script>
<link rel="stylesheet" type="text/css" href="../JQuery/jquery.jqplot.css" />
<script type="text/javascript">
$(document).ready(function(){
var plot1 = $.jqplot ('chart3', [[3,7,9,1,4,6,8,2,5]]);
});
</script>
</head>
<body>
<div id="chart3" style="width:400px; height:300px;"></div>
</body>
</html>
But when I run this code, it gives me javascript error for "excanvas.js" file. like "parentnode" is null or not an object. I am using IE8.

I tried the code and it works fine.
To be 100% honest I run it in ie9 with compatibility mode of ie8, then ie7 (since I update my browsers regularly, I recommend doing the same and asking clients to do the same as well) and it works fine.
The only issue I might expect you can have here is that these scripts:
<script type="text/javascript" src="../JQuery/jqplot.categoryAxisRenderer.min.js"></script>
<script type="text/javascript" src="../JQuery/jqplot.barRenderer.js"></script>
<script type="text/javascript" src="../JQuery/jqplot.categoryAxisRenderer.min.js"></script>
<script type="text/javascript" src="../JQuery/jqplot.canvasTextRenderer.min.js"></script>
<script type="text/javascript" src="../JQuery/jqplot.canvasAxisLabelRenderer.min.js"></script>
... are located in plugins folder which you should have if you downloaded the jqPlot from their site.
To test quickly if this is the issue you can simple delete the aforementioned scripts and the code should work just fine as it is not using them at all.

Related

Fudion chart with Laravel Project

please help me to implement Fusioncharts API with Laravel project, when i use the CDN i have the result, but my project will be local so i do need the script js. When i donwload it i can not see my charts.
<head>
<!-- Step 1 - Include the fusioncharts core library -->
<script type="text/javascript" src="../js/fusioncharts.js"></script>
<!-- Step 2 - Include the fusion theme -->
<script type="text/javascript" src="../js/fusioncharts.theme.fusion.js"></script>
<script type="text/javascript" src="../js/FusionCharts.HC.Charts.js"></script>
<script type="text/javascript" src="../js/jquery.min.js"></script>
<script type="text/javascript" src="../js/FusionCharts.HC.js"></script>
<script type="text/javascript" src="../js/FusionCharts.HC.Widgets.js"></script>
<script type="text/javascript" src="../js/FusionCharts.HC.world.js"></script>
<script type="text/javascript" src="../js/FusionCharts.HC.Maps.js"></script>
<script type="text/javascript" src="../js/control.js"></script>
<script type="text/javascript" src="../js/FusionCharts.HC.PowerCharts.js"></script>
</head>
{{-- <script src="https://cdn.fusioncharts.com/fusioncharts/latest/fusioncharts.js"></script> --}}`

script working fine but error in console laravel blade

<script src="https://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
<script src="/plugins/morris/morris.min.js"></script>
<script src="/plugins/sparkline/jquery.sparkline.min.js"></script>
<script src="/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js"></script>
<script src="/plugins/jvectormap/jquery-jvectormap-world-mill-en.js"></script>
<script src="/plugins/knob/jquery.knob.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.2/moment.min.js"></script>
<script src="/plugins/daterangepicker/daterangepicker.js"></script>
<script src="/plugins/datepicker/bootstrap-datepicker.js"></script>
<script src="/plugins/bootstrap-wysihtml5/bootstrap3-wysiHtml5.all.min.js"></script>
<script src="/dist/js/pages/dashboard.js"></script>
<script src="/plugins/jQuery/jQuery-2.1.4.min.js"></script>
<script src="/bootstrap/js/bootstrap.min.js"></script>
<script src="/plugins/select2/select2.full.min.js"></script>
<script src="/plugins/input-mask/jquery.inputmask.js"></script>
<script src="/plugins/input-mask/jquery.inputmask.date.extensions.js"></script>
<script src="/plugins/input-mask/jquery.inputmask.extensions.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.2/moment.min.js"></script>
<script src="/plugins/daterangepicker/daterangepicker.js"></script>
<script src="/plugins/colorpicker/bootstrap-colorpicker.min.js"></script>
<script src="/plugins/timepicker/bootstrap-timepicker.min.js"></script>
<script src="/plugins/slimScroll/jquery.slimscroll.min.js"></script>
<script src="/plugins/iCheck/icheck.min.js"></script>
<script src="/plugins/fastclick/fastclick.min.js"></script>
<script src="/dist/js/app.min.js"></script>
<script src="/dist/js/demo.js"></script>
here are my footer file that contain links of scripts i have tried
{!! Html::script('js/test.js') !!}
all these sulution in laravel blade but wrked fine for components but still getting the error message in console of not define.not define .
here i am attaching the blade file as well as console errors i have placed all the files in the
layout-blade-php.txt
public folder
<script> $.widget.bridge('uibutton', $.ui.button);</script>
That line must be placed under your script import statements.
Also your jquery script is commented out. Hope this helps.
<script src="https://code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
<script src="/plugins/morris/morris.min.js"></script>
<script src="/plugins/sparkline/jquery.sparkline.min.js"></script>
<script src="/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js"></script>
<script src="/plugins/jvectormap/jquery-jvectormap-world-mill-en.js"></script>
<script src="/plugins/knob/jquery.knob.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.2/moment.min.js"></script>
<script src="/plugins/daterangepicker/daterangepicker.js"></script>
<script src="/plugins/datepicker/bootstrap-datepicker.js"></script>
<script src="/plugins/bootstrap-wysihtml5/bootstrap3-wysiHtml5.all.min.js"></script>
<script src="/dist/js/pages/dashboard.js"></script>
<script src="/plugins/jQuery/jQuery-2.1.4.min.js"></script>
<script src="/bootstrap/js/bootstrap.min.js"></script>
<script src="/plugins/select2/select2.full.min.js"></script>
<script src="/plugins/input-mask/jquery.inputmask.js"></script>
<script src="/plugins/input-mask/jquery.inputmask.date.extensions.js"></script>
<script src="/plugins/input-mask/jquery.inputmask.extensions.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.2/moment.min.js"></script>
<script src="/plugins/daterangepicker/daterangepicker.js"></script>
<script src="/plugins/colorpicker/bootstrap-colorpicker.min.js"></script>
<script src="/plugins/timepicker/bootstrap-timepicker.min.js"></script>
<script src="/plugins/slimScroll/jquery.slimscroll.min.js"></script>
<script src="/plugins/iCheck/icheck.min.js"></script>
<script src="/plugins/fastclick/fastclick.min.js"></script>
<script src="/dist/js/app.min.js"></script>
<script src="/dist/js/demo.js"></script>
<script> $.widget.bridge('uibutton', $.ui.button);</script>

Kendo UI error when setting up Date Picker

I am trying to get Kendo Ui (Free Version working). I am trying to implement the date picker with the below code but alls I get is an empty input field. Does anyone have any suggestions on how to resolve this?
<!DOCTYPE html>
<html>
<head>
<link href="/Content/kendo/2015.3.1111/kendo.common.min.css" rel="stylesheet" />
<link href="/Content/kendo/2015.3.1111/kendo.default.min.css" rel="stylesheet" />
</head>
<body>
<script src="/Scripts/jquery-1.10.2.js"></script>
<script src="/Scripts/kendo/2015.3.1111/kendo.core.min.js"></script>
<script src="/Scripts/kendo/2015.3.1111/kendo.calendar.min.js"></script>
<script src="/Scripts/kendo/2015.3.1111/kendo.popup.min.js"></script>
<script src="/Scripts/kendo/2015.3.1111/kendo.datepicker.min.js"></script>
<script src="/Scripts/kendo/2015.3.1111/kendo.data.min.js"></script>
<script src="/Scripts/kendo/2015.3.1111/kendo.list.min.js"></script>
<script src="/Scripts/kendo/2015.3.1111/kendo.combobox.min.js"></script>
<script src="/Scripts/kendo/2015.3.1111/kendo.dropdownlist.min.js></script>
<script src="/Scripts/kendo/2015.3.1111/kendo.multiselect.min.js"></script>
<script src="/Scripts/kendo/2015.3.1111/kendo.validator.min.js"></script>
<input id="TimeSlot" name="TimeSlot" type="datetime" />
<script type="text/javascript">
$(document).ready(function () {
debugger;
$("#TimeSlot").kendoDatePicker();
//var datepicker = $("#datepicker").data("kendoDatePicker");
});
</script>
</body>
</html>
You need to reference all these javascript files in order for the DatePicker to work. You can use the Kendo UI Custom Download tool to find out which javascript files you need to reference and to download a custom javascript file that contains everything you need:
<script src="http://kendo.cdn.telerik.com/2015.3.1111/js/kendo.core.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2015.3.1111/js/kendo.calendar.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2015.3.1111/js/kendo.popup.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2015.3.1111/js/kendo.datepicker.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2015.3.1111/js/kendo.data.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2015.3.1111/js/kendo.list.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2015.3.1111/js/kendo.combobox.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2015.3.1111/js/kendo.dropdownlist.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2015.3.1111/js/kendo.multiselect.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2015.3.1111/js/kendo.validator.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2015.3.1111/js/kendo.aspnetmvc.min.js"></script>
UPDATE:
Your text-box's id is "TimeSlot", but in your script you're referring to #datepicker which doesn't even exist. Change your script to this:
<script type="text/javascript">
$(document).ready(function () {
$("#TimeSlot").kendoDatePicker();
//var datepicker = $("#TimeSlot").data("kendoDatePicker");
});
</script>
By the way, you won't need kendo.aspnetmvc.min.js if you don't want to use Kendo's Html Helpers, which is not something that I would recommend if you are using asp.net MVC. With kendo.aspnetmvc.min.js, you wouldn't even need the script, you could just replace your text-box (input tag) with this:
#(Html.Kendo().DatePicker().Name("TimeSlot"))

Lightbox2 and ScrollTo not working

Im trying to use ScrollTo and Lightbox2 on the same page but the Lightbox2 JS links knock out the ScrollTo JS files.
This is what I have:
<link href="css/layout.css" rel="stylesheet" type="text/css" />
<link href="css/lightbox.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script type="text/javascript" src="http://flesler-plugins.googlecode.com/files/jquery.localscroll-1.2.7-min.js"></script>
<script type="text/javascript" src="http://flesler-plugins.googlecode.com/files/jquery.scrollTo-1.4.2-min.js"></script>
<script type="text/javascript" src="js/transition.js"></script>
<script type="text/javascript">
$(document).ready(function()
{
$('#links').localScroll({
target:'body'
});
});
<script type="text/javascript" src="js/transition.js"></script>
Where am I going wrong?
Hope someone can help!
Kind Regards
Matt
<script type="text/javascript"> $(document).ready(function() {
$('#links').localScroll({
target:'body'
});
});
I think you have a typo? You need to end this script with </script>

Using the jQuery plugin ColorBox in noConflict() mode

I am using the jQuery plugin ColorBox in a Joomla! theme, and am having a hard time getting it to work in noConflict() mode. I have the following code that calls my jQuery and the noConflict(); call, followed by my actual jQuery markup:
<script type="text/javascript" language="javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" language="javascript">jQuery.noConflict();</script>
<script type="text/javascript" language="javascript" src="PATH TO COLORBOX"></script>
<script type="text/javascript" language="javascript">
jQuery(document).ready(function(){
jQuery('a.colorbox').colorbox();
})
</script>
However, I simply cannot get it to work under noConflict() mode. when disabling the no conflict mode it works no worries, but then the associated Mootools scripts in Joomla do not work.
Can someone point me in the right direction here?
Much Appreciated,
Simon
It turned out that after all of this, it was related to the order in which Joomla! was calling scripts. So for all those who stumble across the same issue, your script calls must all be called AFTER Joomla! include head tag, like follows:
<jdoc:include type="head" />
<script type="text/javascript" language="javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" language="javascript">jQuery.noConflict();</script>
<script type="text/javascript" language="javascript" src="<?php echo JURI::base(); ?>templates/helen-o-grady/js/jquery.colorbox-min.js"></script>
<script type="text/javascript" language="javascript">
jQuery(document).ready(function(){
jQuery('a.colorbox').colorbox({iframe:true, width:900, height:650});
})(jQuery)
</script>
Here is answer: How to use no conflict for two types of jquery scripts.
I have fixed this way:
<script type="text/javascript">
var jQuery1_10_2 = $.noConflict(true);
jQuery1_10_2 (document).ready(function() {
jQuery1_10_2 (".video-popup").colorbox({iframe:true, innerWidth:850, innerHeight:509, fixed:true});
});
</script>
here .video-popup is my popup wrapper class. change it.

Resources