Posted on August 8, 2008 by sharat
<html > <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″><title>Untitled 1</title><script type=”text/javascript” src= “../js/dojo/dojo/dojo.js” djConfig=”isDebug: true”></script><script type=”text/javascript”>dojo.require(“dojox.charting.Chart2D”);makeCharts = function(){var chart1 = new dojox.charting.Chart2D(“simplechart”);chart1.addPlot(“default”, {type: “Lines”});chart1.addPlot(“other”, {type: “Areas”, hAxis: “other x”, vAxis: “other y”});chart1.addPlot(“Grid”, {type: “Grid”, hAxis: “other x”, vAxis: “other y”,hMajorLines: true, hMinorLines: false, vMajorLines: true, vMinorLines: false});chart1.addAxis(“x”, { labels: [{value: 1, text: "Jan"}, {value: 2, text: "Feb"}, [...]
Filed under: Dojo | 1 Comment »
Posted on August 8, 2008 by sharat
<html > <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″><title>Untitled 1</title><script type=”text/javascript” src= “../js/dojo/dojo/dojo.js” djConfig=”isDebug: true”></script><script type=”text/javascript”>dojo.require(“dojox.charting.Chart2D”);makeCharts = function(){var chart1 = new dojox.charting.Chart2D(“simplechart”);chart1.addPlot(“default”, {type: “Lines”});chart1.addPlot(“other”, {type: “Areas”, hAxis: “other x”, vAxis: “other y”});chart1.addPlot(“Grid”, {type: “Grid”, hAxis: “other x”, vAxis: “other y”,hMajorLines: true, hMinorLines: false, vMajorLines: true, vMinorLines: false});chart1.addAxis(“y”, {vertical: true});chart1.addAxis(“other x”, {leftBottom: false});chart1.addAxis(“other y”, {vertical: true, leftBottom: false, [...]
Filed under: Dojo | Leave a Comment »
Posted on August 8, 2008 by sharat
<html> <head runat=”server”><meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″><title>Untitled 1</title><script type=”text/javascript” src= “../js/dojo/dojo/dojo.js” djConfig=”isDebug: true”></script><script type=”text/javascript”>dojo.require(“dojox.charting.Chart2D”);makeCharts = function(){var chart1 = new dojox.charting.Chart2D(“simplechart”);chart1.addPlot(“default”, {type: “Lines”});chart1.addPlot(“other”, {type: “Areas”, hAxis: “other x”, vAxis: “other y”});chart1.addAxis(“x”);chart1.addAxis(“y”, {vertical: true});chart1.addAxis(“other x”, {leftBottom: false});chart1.addAxis(“other y”, {vertical: true, leftBottom: false, max: 7, stroke: “green”, font: “normal normal bold 14pt Tahoma”, fontColor: “red”, majorTick: [...]
Filed under: Dojo | Leave a Comment »
Posted on August 8, 2008 by sharat
<html> <head runat=”server”><meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″><title>Untitled 1</title><script type=”text/javascript” src= “../js/dojo/dojo/dojo.js” djConfig=”isDebug: true”></script><script type=”text/javascript”>dojo.require(“dojox.charting.Chart2D”);makeCharts = function(){var chart1 = new dojox.charting.Chart2D(“simplechart”);chart1.addPlot(“default”, {type: “Lines”});chart1.addPlot(“other”, {type: “Areas”, hAxis: “other x”, vAxis: “other y”});chart1.addAxis(“x”);chart1.addAxis(“y”, {vertical: true});chart1.addAxis(“other x”, {leftBottom: false});chart1.addAxis(“other y”, {vertical: true, leftBottom: false});chart1.addSeries(“Series 1″, [1, 2, 2, 3, 4, 5, 5, 7]);chart1.addSeries(“Series 2″, [1, 1, 4, 2, 1, 6, [...]
Filed under: Dojo | Leave a Comment »
Posted on August 8, 2008 by sharat
<html> <head runat=”server”><meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″><title>Untitled 1</title><script type=”text/javascript” src= “../js/dojo/dojo/dojo.js” djConfig=”isDebug: true”></script><script type=”text/javascript”>dojo.require(“dojox.charting.Chart2D”);makeCharts = function(){ var chart1 = new dojox.charting.Chart2D(“simplechart”);chart1.addPlot(“default”, {type: “Lines”});chart1.addPlot(“other”, {type: “Areas”});chart1.addAxis(“x”);chart1.addAxis(“y”, {vertical: true});chart1.addSeries(“Series 1″, [1, 2, 2, 3, 4, 5, 5, 7]);chart1.addSeries(“Series 2″, [1, 1, 4, 2, 1, 6, 4, 3], {plot: “other”, stroke: {color:”blue”}, fill: “lightblue”});chart1.render(); };dojo.addOnLoad(makeCharts);</script></head><body><div id=”simplechart” style=”width: 250px; height: [...]
Filed under: Dojo | Leave a Comment »
Posted on August 8, 2008 by sharat
<html> <head runat=”server”><meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″><title>Untitled 1</title><script type=”text/javascript” src= “../js/dojo/dojo/dojo.js” djConfig=”isDebug: true”></script><script type=”text/javascript”>dojo.require(“dojox.charting.Chart2D”);makeCharts = function(){ var chart1 = new dojox.charting.Chart2D(“simplechart”); chart1.addPlot(“default”, {type: “Lines”, markers: true, tension:3, shadows: {dx: 2, dy: 2, dw: 2}}); chart1.addAxis(“x”); chart1.addAxis(“y”, {vertical: true}); chart1.addSeries(“Series 1″, [1, 2, 2, 3, 4, 5, 5, 7]); chart1.render();};dojo.addOnLoad(makeCharts);</script></head><body><div id=”simplechart” style=”width: 250px; height: 150px;”></div></body></html> Output:
Filed under: Dojo | 5 Comments »
Posted on August 8, 2008 by sharat
<html> <head runat=”server”><meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″><title>Untitled 1</title><script type=”text/javascript” src= “../js/dojo/dojo/dojo.js” djConfig=”isDebug: true”></script><script type=”text/javascript”>dojo.require(“dojox.charting.Chart2D”);makeCharts = function(){ var chart1 = new dojox.charting.Chart2D(“simplechart”); chart1.addPlot(“default”, {type: “Areas”}); chart1.addAxis(“x”); chart1.addAxis(“y”, {vertical: true}); chart1.addSeries(“Series 1″, [1, 2, 2, 3, 4, 5, 5, 7]); chart1.render();};dojo.addOnLoad(makeCharts);</script></head><body><div id=”simplechart” style=”width: 250px; height: 150px;”></div></body></html> output:
Filed under: Dojo | Leave a Comment »
Posted on August 8, 2008 by sharat
<html> <head runat=”server”><meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″><title>Untitled 1</title><script type=”text/javascript” src= “../js/dojo/dojo/dojo.js” djConfig=”isDebug: true”></script><script type=”text/javascript”>dojo.require(“dojox.charting.Chart2D”);makeCharts = function(){ var chart1 = new dojox.charting.Chart2D(“simplechart”); chart1.addPlot(“default”, {type: “Lines”}); chart1.addAxis(“x”); chart1.addAxis(“y”, {vertical: true}); chart1.addSeries(“Series 1″, [1, 2, 2, 3, 4, 5, 5, 7]); chart1.render();};dojo.addOnLoad(makeCharts);</script></head><body><div id=”simplechart” style=”width: 250px; height: 150px;”></div></body></html> Output:
Filed under: Dojo | Leave a Comment »
Posted on August 5, 2008 by sharat
1. Use Firebug or Firebug Lite Firebug, an open source debugging extension for Firefox, is essential for JavaScript, HTML and CSS debugging. You can download it from the Firebug web site. 2. Logging In Dojo logging, you can associate messages with severity, just like in log4j. The following code illustrates the five severity levels: [...]
Filed under: Dojo | Leave a Comment »
Posted on August 5, 2008 by sharat
<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd”><html> <head> <title>Dojo</title> <!– load the dojo toolkit base –> <script type=”text/javascript” src= “dojo/dojo/dojo.js” djConfig=”parseOnLoad:true, isDebug:true”></script> <script type=”text/javascript”> // Load Dojo’s code relating to the Button widget dojo.require(“dijit.form.Button”); </script> <script> function helloCallback(data,ioArgs) { alert(data); } function helloError(data, ioArgs) { alert(‘Error when retrieving data from the server!’); [...]
Filed under: Dojo | 1 Comment »
Posted on August 5, 2008 by sharat
<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd”><html> <head> <title>Dojo</title> <!– load the dojo toolkit base –> <script type=”text/javascript” src= “dojo/dojo/dojo.js” djConfig=”parseOnLoad:true, isDebug:true”></script> <script type=”text/javascript”> // Load Dojo’s code relating to the Button widget dojo.require(“dijit.form.Button”); </script> <script> function helloCallback(data,ioArgs) { alert(data); } function helloError(data, ioArgs) { alert(‘Error when retrieving data from the server!’); [...]
Filed under: Dojo | Leave a Comment »
Posted on August 5, 2008 by sharat
<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd”><html> <head> <title>Dojo</title> <!– load the dojo toolkit base –> <script type=”text/javascript” src= “dojo/dojo/dojo.js” djConfig=”parseOnLoad:true, isDebug:true”></script> <script type=”text/javascript”> // Load Dojo’s code relating to the Button widget dojo.require(“dijit.form.Button”); </script> <script> function helloCallback(data,ioArgs) { alert(data); } function helloError(data, ioArgs) { alert(‘Error when retrieving data from the server!’); [...]
Filed under: Dojo | Leave a Comment »
Posted on August 5, 2008 by sharat
<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd”><html> <head> <title>Dojo</title> <!– load the dojo toolkit base –> <script type=”text/javascript” src= “dojo/dojo/dojo.js” djConfig=”parseOnLoad:true, isDebug:true”></script> <script type=”text/javascript”> // Load Dojo’s code relating to the Button widget dojo.require(“dijit.form.Button”); </script> <button dojoType=”dijit.form.Button” id=”helloButton”> Hello World! <script type=”dojo/method” event=”onClick”> alert(‘You pressed the button’); </script> </button> <style type=”text/css”> /* [...]
Filed under: Dojo | Leave a Comment »
Posted on July 25, 2008 by sharat
<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd”><html> <head> <title>Dojo</title> <!– load the dojo toolkit base –> <script type=”text/javascript” src= “dojo/dojo/dojo.js” djConfig=”parseOnLoad:true, isDebug:true”></script> <script type=”text/javascript”> dojo.addOnLoad(function(){ var animArgs = { node: “testHeading”, duration: 1000, // ms to run animation delay: 250 // ms to stall before playing }; dojo.fadeOut(animArgs).play();}); </script> <style type=”text/css”> [...]
Filed under: Dojo | Leave a Comment »
Posted on July 25, 2008 by sharat
<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd”><html> <head> <title>Dojo</title> <!– load the dojo toolkit base –> <script type=”text/javascript” src= “dojo/dojo/dojo.js” djConfig=”parseOnLoad:true, isDebug:true”></script> <script type=”text/javascript”> dojo.addOnLoad(function(){ var node = dojo.byId(“testHeading”); dojo.connect(node,”onclick”,function(){ node.innerHTML = “Click! Click!!”; }); }); </script> <style type=”text/css”> /* CSS */ .testClass { background-color:red;} </style> </head> <body> [...]
Filed under: Dojo | Leave a Comment »
Posted on July 25, 2008 by sharat
<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd”><html> <head> <title>Dojo</title> <!– load the dojo toolkit base –> <script type=”text/javascript” src= “dojo/dojo/dojo.js” djConfig=”parseOnLoad:true, isDebug:true”></script> <script type=”text/javascript”> dojo.require(“dojo.NodeList-fx”); dojo.addOnLoad(function(){ // our dom is ready, get the node: dojo.query(“#testHeading”) // add “testClass” to its class=”” attribute .addClass(“testClass”) // and fade it out after 500 ms .fadeOut({ [...]
Filed under: Dojo | Leave a Comment »
Posted on July 25, 2008 by sharat
<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd”><html> <head> <title>Dojo</title> <!– load the dojo toolkit base –> <script type=”text/javascript” src= “dojo/dojo/dojo.js” djConfig=”parseOnLoad:true, isDebug:true”></script> <script type=”text/javascript”> dojo.require(“dijit.form.Button”); dojo.require(“dijit.TitlePane”); dojo.addOnLoad(function(){ dojo.byId(“testHeading”).innerHTML = “See!! New Heading is here”; console.log(“Execution Sequence: 1. require() 2. onLoad “); }); </script> <style type=”text/css”> /* CSS */ </style> [...]
Filed under: Dojo | Leave a Comment »
Posted on July 25, 2008 by sharat
dojotest.html <!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd”><html> <head> <title>Dojo</title> <!– load the dojo toolkit base –> <script type=”text/javascript” src= “dojo/dojo/dojo.js” djConfig=”parseOnLoad:true, isDebug:true”></script> <script type=”text/javascript”> // a very common method of loading code onLoad var init = function(){ console.log(“Hello World in Dojo!!”); }; dojo.addOnLoad(init); // and/or pass an anonymous function [...]
Filed under: Dojo | Leave a Comment »
Posted on July 23, 2008 by sharat
Dojo is structured in 4 main projects: Dojo Core, Dijit, DojoX, and Dojo Utilities. Simply including the standard dojo.js gives you: A very fast, lean (26KB gzipped) core packed full of APIs for XHR, events, DOM, query, animations, namespacing, and other highly used convenience functions. Optional modules for dates, colors, back button/history, currency, and more [...]
Filed under: Dojo | Leave a Comment »
Posted on May 7, 2008 by sharat
1. Getting Data Create one sample file to load in and name it as sample.txt with below textI am a <em>remote</em> file.We used Dojo(Ajax) to put textin our page <!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”><html><head><meta http-equiv=”Content-Type” content=”text/html; charset=ISO-8859-1″><title>Getting data with Dojo</title><!– load the dojo toolkit base –><script type=”text/javascript” src=”dojo/dojo.js”djConfig=”parseOnLoad:true, isDebug:true”></script><script type=”text/javascript”>var init = [...]
Filed under: Dojo | 1 Comment »
Posted on May 7, 2008 by sharat
<html><head><title>Dojo Toolkit Working Examples</title> <!– load the dojo toolkit base –><script type=”text/javascript” src=”dojo/dojo.js”djConfig=”parseOnLoad:true, isDebug:true”></script><script type=”text/javascript”>/* our JavaScript will go here */dojo.require(“dijit.form.Button”);dojo.require(“dijit.TitlePane”);dojo.require(“dojo.NodeList-fx”);//——Example – 1————-dojo.addOnLoad(function(){dojo.byId(“testHeading”).innerHTML = “We’re on our way!”console.log(“onLoad fires after require() is done”);dojo.query(“#testHeading”)// add “testClass” to its class=”” attribute.addClass(“testClass”)// and fade it out after 500 ms.fadeOut({ delay:2000 }).play();dojo.query(“.para”).addClass(“testClass”).fadeOut({ delay: 1000 }).play();var node = dojo.byId(“testHeading”);dojo.connect(node,”onclick”,function(){node.innerHTML = [...]
Filed under: Dojo | 1 Comment »
Posted on November 13, 2007 by sharat
1.What is and Why Dojo Toolkit ? Dojo toolkit is open source DHTML toolkit written in JavaScript. In other words, it is a set of JavaScript libraries. Dojo toolkit aims to solve some long-standing historical problems with DHTML such as browser incompatibility. Dojo toolkit also allows you easily add dynamic capabilities into the web pages [...]
Filed under: Dojo, Interview Questions | 3 Comments »