Better yet, don’t use this pattern at all. There is an implicit eval when you set a string as an event handler. Also, this example does not seem to be unobtrusive.
It seems that this is what you’re looking for (depending on the rest of the HTML):
[script]
document.getElementById(“the_button”).onclick = function () {
document.getElementsByName(“cSSid”).value = “”;
}
[/script]
Also note that IE in real standards mode will noot leak ids as global symbols in JavaScript. Thus the very first code does not work in any browser if you’re doing things right.