I have an object that needs to be placed inside a function call on an onclick event, and javascript has to make this all up itself.
Like so:
Code: Select all
document.getElementById('list').innerHTML += '<li><span onclick="aFunction(' + object + ');">La la la.</span></li>';Right now, when trying the code I posted, I get a "missing a ] after element list." error.
- Nathaniel[/syntax]