Funny same here.. couldn't catch why didnt' worked.. But this worked: ========================= item.onclick = function () { alert('foo'); }; ========================= Anthony Ettinger escreveu: >this doesn't seem to work: > >var item = document.getElementById('foo'); >item.onclick = "alert('foo');"; > >http://developer.mozilla.org/en/docs/DOM:element.onclick > >Anthony Ettinger >ph: (408) 656-2473 >web: http://www.apwebdesign.com >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript > > -- Flavio Gomes flavio at economisa.com.br