Gears might now gain some traction, with the people I try to persuade into using it, as it’s install base grows.
There are several major API components to Gears:
No related posts.
In case you don’t know, CSS expressions were actual bits of JavaScript that you could run from CSS rules; this was commonly used to simulate the CSS max-width property for IE:
No related posts.
When connecting events to simple DOM elements you use standard w3c event handlers. Here is a list of the DOM events implemented in gecko based browsers.
1: dojo.connect(dojo.byId('htmlElement'), ‘onclick’, myFunction);
1: dojo.connect(dojo.byId('htmlElement'),'onclick',function(){
2: dijit.byId('myDigit').show();
3: });
Doing the same thing with Dijits you need to use the available methods..they have the same name but are in camel case.
onClick
onBlur
onChance
Here is a link to the dijit.form.Button for example: dijit.form.Button
1: dojo.connect(dijit.byId('myDijit'), 'onClick', doSomething);
Related posts:
Ok, so yesterday I spent a good deal of the day trying to figure out how to manage the display of DOM elements. I searched Google, the dojo forums, the tests on archive.dojotoolkit.org with no simple answer. Coming from a heavy jQuery background I just could not believe that you had to bring in additional classes and/or write your own functions.
But dojo is a powerful beast, sometimes referred to as an elephant, so I guess I just have to “use the force…er um…power”
dojo.query(‘#hide’).hide();
dojo.query(.’show’).show();
dojo.query(‘.toggle’).toggle();
WARNING: The code below is incredibly crude, it does not take into account for inline elements, there are no advanced arguments like fade or animation, and the toggle method is not fully implemented.
1: dojo.extend(dojo.NodeList, {
2: show: function(){
3: console.log(this);
4: this.forEach( item.style.display = 'block' );
5: return this;
6: },
7: hide: function(){
8: this.forEach(function(item){
9: console.log(item);
10: item.style.display = 'none';
11: });
12: return this;
13: },
14: toggle: function(){
15: this.forEach(function(item){
16: if(item.style.display == 'none'){
17: //this.show();
18: item.style.display = 'block';
19: } else {
20: item.style.display = 'none';
21: }
22: });
23: return this;
24: }
25: });
PS: thanks Jayant for giving me the put to use the true power of dojo.
No related posts.
In jQuery DOM manipulation is incredibly easy:
$("#dealer-toggle").toggle();
One would assume the same can be accomplished in dojo via:
dojo.query('node').toggle();
but you would be DAMN WRONG!
dojo.query will work fine but hide/show/toggle have been moved to the dojo.fx and renamed fadeOut for .hide() and wipeIn for .show()…what about toggle? no sir. There is no dojo function to toggle nods. You have to write your own.
For anyone using the ESRI JavaScript Library for ArcGIS Server (a JavaScript Lib based on Dojo): ESRI created their own namespace in the API.
The ESRI namespace consists of 7 methods. I bet you can guess 3 of them.
hide
show
and of course
toggle
http://resources.esri.com/help/9.3/arcgisserver/apis/javascript/arcgis/help/jsapi/namespace_esri.htm
Related posts:
I’ve come to be unhappy with the jquery plugin system. I seem to be in a perpetual cycle of “lookup-download-install-initialized-use” and based on the recent milestone slippage I just don’t have the time required when the only payoff (vs. other JS libs) seems to be streamlined JavaScript package……then again aren’t all the plugins adding crazy overhead? Whatever…I’m going to use the dojotoolkit.
I love me some dojo!
No related posts.
After publishing a service if you make changes to the .MXD you need to clear the REST cache. There are a few ways to clear the REST cache:
Until you restart IIS the updates to the MXD will not be reflected in the REST service endpoint.

No related posts.
LINQ requires all tables that you work with to have a PK. If you don’t have a PK on a table you can use the designer to set a PK on the generated code. This won’t effect your database.
No related posts.
Don’t seem to play nice.
It seems that both call create a function called … Number.function and error out when used together.
[Exception... "'Sys.ParameterCountException: Sys.ParameterCountException: Parameter count mismatch.' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0×8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)" location: "<unknown>" data: no]
Don’t use ASP.NET AJAX if your using the vastly superior Dojo Toolkit
Related posts: