After putting a small script together and pasting it into the Content Editor Web part all my breakpoints show the following warning in IE 8's debugger: "The breakpoint is not valid. No executable code is associated with this line".
I realize that the CEWP is not the most ideal environment for executing JavaScript. Generally linked files are better however this same issue has occurred even when I have linked the CEWP to a script file. The script is as follows:
<script language="javascript" src="/code_lib/excanvas.js" type="text/javascript"></script>
<script type="text/javascript"> if (!window.console) console = {log: function() {}}; </script>
<script language="javascript" src="/code_lib/jquery-1.7.2.js" type="text/javascript"></script>
<script language="javascript" src="/code_lib/jquery.jqplot.min.js" type="text/javascript"></script>
<script language="javascript" src="/code_lib/plugins/jqplot.barRenderer.min.js" type="text/javascript"></script>
<script language="javascript" src="/code_lib/plugins/jqplot.categoryAxisRenderer.min.js" type="text/javascript"></script>
<script language="javascript" src="/code_lib/plugins/jqplot.pointLabels.min.js" type="text/javascript"></script>
<link href="/code_lib/jquery.jqplot.css" rel="stylesheet" type="text/css"/>
<script language="javascript" src="/code_lib/json2.js" type="text/javascript"></script><script language="javascript" type="text/javascript">
$(document).ready(function(){
var stringURL = https://mydomain.com/Sandbox/bitest/_vti_bin/ListData.svc/Produce
$.getJSON(stringURL, function(data){
quantityOneArray=[];
$(data).find("z\\:row").each(function(i, result) {
quantityOneArray[i] = parseFloat($(this).attr("ows_Quantity"));
});
});
});
</script>
It's possible that I messed up the syntax in my code or made another obvious error.
I am linking in many JavaScript libraries to ultimately create a chart with the pulled JSON data. This script is designed to run in IE7 hence the JSON2 call and the console script in the head.