Comunque dopo aver inserito tra le graffe della funzione javascript, la tua stringa l'erroe è cambiato con questo:
Dettagli errore pagina Web

Agente utente: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.3; Creative AutoUpdate v1.10.10)
Timestamp: Sat, 29 Jan 2011 14:48:55 UTC


Messaggio: Object expected
Linea: 6
Carattere: 5
Codice: 0
URI: http://127.0.0.1/upd.php
ovviamente l'ho cambiata in questo modo:
var f = getElementById("$id");
quindi:
function elimina(codice)
{ var f = getElementById("$id");
f.cod.value=codice;
f.action="del_usr.php";
f.submit();
}