[thelist] JavaScript - adding onclick events to links that do not execute (advanced)

Tom Dell'Aringa pixelmech at yahoo.com
Fri Nov 25 11:53:17 CST 2005


The problem does now appear that I'm not getting a string sent for my second parameter of the
ajaxController(). The snippet again:

============================================
var filmstripItems = new Array();
	filmstripItems[0] = "colorado";
	filmstripItems[1] = "scene2";
	filmstripItems[2] = "scene3";
	
	for(var y=0; y<anchors.length; y++)
	{
		anchors[y].onclick = function() {
			ajaxController('load_full', ""+filmstripItems[y]+"");
			return false;
		}
		anchors[y].href = "http://www.google.com/";
	}

============================================

I've tried every variation of ""+filmstripItems[y]+"" (quotes combinations) to get that array
item to go as a string but I constantly get 'undefined'. If I alert() that guy, it shows me the
value, but passing it seems to be the issue. Any ideas?

Tom


http://www.pixelmech.com/
"I was in a convenience store reading a magazine and the clerk came up to me and said "This is not a library". so I said, "All right, I will talk louder then!"



More information about the thelist mailing list