Escaping commas

Hey,

I was wondering about escaping commas. It appears to be \, but when I do something like this:



grid.addRow(2,“Test  <img src=‘http://www.google.com/intl/en_ALL/images/logo.gif’ onclick=“someFn(‘hello’\,‘world’);”/>”);



My html fails to render.



Is my syntax incorrect? (it doesn’t work as , either)



Thanks so much,

Michael

The addRow has alternative syntax, which can be used if you plan to add values with commas
Instead of
    grid.addRow(id,“a,b,c”);
you can use
    grid.addRow(id,[a,b,c]) // use an array instead of comma separated string

    grid.addRow(2,[“Test  <img
src=‘http://www.google.com/intl/en_ALL/images/logo.gif
onclick=“someFn(‘hello’,‘world’);”/>”]);


What if I want to pass an object?



grid.addRow(2,[“Test  <img src=’…/images/img.gif’ onclick=“someFn(” + grid + " );”/>"]); 
This throws an error, as does:



var args = {one:1};
grid.addRow(2,[“Test  <img src=’…/images/img.gif’ onclick=“someFn(” + args + " );”/>"]); 



Thanks for your quick response,
Michael

The code which you are using for new row creating will be converted to string in any case, so it not possible to store object references in it.