Chris Nizzardini, Salt Lake City Utah, Web Developer Specializing in LAMP+Ajax Since 2006

My Blog

Here is my awesome blog. You can find information on programming, linux, documentation, tips for code and database optimization, my thoughts and rants, and whatever else I feel like sharing. Feel free to contribute to the blog by posting comments and asking questions.
JavaScript and Ajax

adding an event to a cell using insertCell

1
2
3
4
5
var row = $(element).insertRow(1);
var qty = row.insertCell(1);
qty.innerHTML = productArr[i].qty;
qty.id='qty_'+productArr[i].service_id;
qty.addEvent("click",function() {mod(this) });

You actually have to nest your function call inside of function(){} and especially if you want to pass additional parameters into the function.

Related posts:

  1. ajax and the xmlhttprequest object

Leave a Reply