[Dojo-interest] javascript : copy or reference

Thibaut thibaut at fuse.co.uk
Thu Feb 8 04:54:24 MST 2007


In the following example the "i" variable seems to be passed by  
reference to the getClientList(i)
Therefore getClientList(9) is always called !

			for(var i=1; i<=8; i++) {
				var span2 = document.createElement("span");
				dojo.event.connect(span2, 'onclick', function(e) {getClientList 

How can i manage to call getClientList(1), getClientList(2) ...  
getClientList(8) ?


More information about the Dojo-interest mailing list