I want to add graph visualisation to my php page and for that i have written code but I don't know why it is not showing anything. Can any one help me to solve my problem.
Thanks in advance
<html>
<head>
<script language="javascript" type="text/javascript" src="arbor_files/jquery.js"> </script>
<script language="javascript" type="text/javascript" src="arbor_files/arbor.js"></script>
<script language="javascript" type="text/javascript" src="arbor_files/arbor-tween.js"></script>
<script language="javascript" type="text/javascript" src="arbor_files/graphics.js"></script>
<script language="javascript" type="text/javascript" src="arbor_files/renderer.js"></script>
</head>
<body>
<canvas id="viewport" width="800" height="600"></canvas>
<script language="javascript" type="text/javascript">
var sys = arbor.ParticleSystem(1000, 400,1);
sys.parameters({gravity:true});
sys.renderer = Renderer("#viewport") ;
var animals = sys.addNode('Animals',{'color':'red','shape':'dot','label':'Animals'});
var dog = sys.addNode('dog',{'color':'green','shape':'dot','label':'dog'});
var cat = sys.addNode('cat',{'color':'blue','shape':'dot','label':'cat'});
sys.addEdge(animals, dog);
sys.addEdge(animals, cat);
</script>
</body>
</html>
I ported your code over and it loads fine.
Can you check the location where you saved your js files?
Related
this is html file
<!DOCTYPE html>
<html ng-app="myApp">
<head>
<title>BlogIt!</title>
<script type="text/javascript" src="bower_components/angular/angular.min.js"></script>
<script type="text/javascript" src="app.js"></script>
</head>
<body ng-controller="myCtrl">
{{message}}
</body>
</html>
this is js file
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope){
$scope.message = "Welcome to BlogIt!";
})
Edit with this :
<head>
<title>BlogIt!</title>
<script type="text/javascript" src="bower_components/angular/angular.min.js"></script>
<script type="text/javascript" src="app.js"></script>
</head>
<body ng-app="myApp" ng-controller="myCtrl">
{{message}}
</body>
I have one page index.html
I've made page with head:
<script src="/assets/javascripts/jquery.js"></script>
<script src="/assets/javascripts/underscore.js"></script>
<script src="/assets/javascripts/jquery-ui.js"></script>
<script src="/assets/javascripts/json2.js"></script>
<script src="/assets/javascripts/jquery.lazyload.js"></script>
<script src="/assets/javascripts/scrollstop.js"></script>
<script src="/assets/javascripts/backbone.js"></script>
<script src="/assets/javascripts/backbone/search.js"></script>
<script src="assets/javascripts/backbone/templates/filter.jst.ejs" type="text/template"></script>
<script src="/assets/javascripts/backbone/templates/item.jst.ejs" type="text/template"></script>
<script src="/assets/javascripts/backbone/templates/item_loading.jst.ejs" type="text/template"></script>
<script src="/assets/javascripts/backbone/templates/more.jst.ejs" type="text/template"></script>
<script src="/assets/javascripts/backbone/templates/razbor.jst.ejs" type="text/template"></script>
<script src="/assets/javascripts/backbone/templates/total.jst.ejs" type="text/template"></script>
<script src="/assets/javascripts/backbone/models/filter.js"></script>
<script src="/assets/javascripts/backbone/models/filter_value.js"></script>
<script src="/assets/javascripts/backbone/models/item.js"></script>
<script src="/assets/javascripts/backbone/models/more.js"></script>
<script src="/assets/javascripts/backbone/models/razbor.js"></script>
<script src="/assets/javascripts/backbone/models/search.js"></script>
<script src="/assets/javascripts/backbone/views/filter_view.js"></script>
<script src="/assets/javascripts/backbone/views/item_view.js"></script>
<script src="/assets/javascripts/backbone/views/razbor_view.js"></script>
<script src="/assets/javascripts/backbone/views/search_view.js"></script>
<script src="/assets/javascripts/backbone/routers/search_router.js"></script>
And chrome tells me:
Uncaught ReferenceError: JST is not defined
at filter_view.js:4
The line 4:
template: JST["backbone/templates/filter"],
What should I do without Rails to fix my problem?
Thanks for advises!
I'm trying to learn the basics on angular. I installed angular via npm.
Just trying to run my first app
<!DOCTYPE html>
<html>
<head>
<title>ngClassifieds</title>
</head>
<body ng-app="ngClassifieds" ng-init="message = 'Hello' ">
<h1>{{message}}</h1>
<script type="text/javascript" scr="node_modules/angular/angular.js"></script>
<script type="text/javascript" scr="scripts/app.js"></script>
</body>
</html>
In my app.js it's just this line of code:
angular.module("ngClassifieds", []);
I ran the below command to start up the server as I had installed http server on my project directory
http-server
I opened up my localhost url which was localhost:8080 but for some reasons it was not showing Hello message but instead it was showing {{message}}
Not sure what I went wrong here.
<script type="text/javascript" scr="node_modules/angular/angular.js"></script>
<script type="text/javascript" scr="scripts/app.js"></script>
it is not scr chenge it to src
<script type="text/javascript" src="node_modules/angular/angular.js"></script>
<script type="text/javascript" src="scripts/app.js"></script>
Below code will solve you problem.
angular.module("ngClassifieds", []);
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<!DOCTYPE html>
<html>
<head>
<title>ngClassifieds</title>
</head>
<body ng-app="ngClassifieds" ng-init="message = 'Hello' ">
<h1>{{message}}</h1>
<script type="text/javascript" src="node_modules/angular/angular.js"></script>
<script type="text/javascript" src="scripts/app.js"></script>
</body>
</html>
I know asking this is silly but I am stuck and not getting out of it. I am new to Angular.js and have created the following program but it is not running as the program can't find the script sources..I have tried all the possible ways but haven't found the solution.
<!DOCTYPE html>
<html ng-app="eventsApp">
<head>
</head>
<body>
<div ng-controller="EventController">
{{event.name}}
</div>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js" > </script>
<script type="text/javascript" src="/js/app.js"></script>
<script type="text/javascript" src="/js/controllers/EventController.js"></script>
</body>
</html>
Following is the snapshot of my folder arrangement:
I think you should remove the / before js in the src.if it is not working then check if it is the right path.
<script type="text/javascript" src="/js/app.js"></script>
<script type="text/javascript" src="/js/controllers/EventController.js"> </script>
Should Be
<script type="text/javascript" src="../js/app.js"></script>
<script type="text/javascript" src="../js/controllers/EventController.js"></script>
OR
<script type="text/javascript" src="js/app.js"></script>
<script type="text/javascript" src="js/controllers/EventController.js"></script>
Depending on your location and path of js folder....
just for learning purpose--
index.html
<html>
<head>
<script src="http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.3/angular.min.js"></script>
<script src="script.js"></script>
<script src="ctrl.js"></script>
</head>
<body ng-app="abc">
<h1 ng-controller="ctrl">{{data}}</h1>
</body>
</html>
script.js
angular.module('abc', []);
ctrl.js
angular.module('abc').controller('ctrl',function($scope){
$scope.data="hello";
});
js fiddle link
it showing error... what i ve done wrong here???
You named your controller file wrongly.
<head>
<script src="http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.3/angular.min.js"></script>
<script src="script.js"></script>
<script src="cntrl.js"></script>
</head>