I can't use js selector

Hello !
I try to custom owncloud for my organization. I want to show a windows when the avatar is clicked in the users menu. So I’ve added : $tr.find('.avatar').attr('id', user.name); in owncloud/settings/js/users/users.js and it work. I created a js files and i linked it in users/main.php :
window.onload = function() { var items = document.getElementById("Arthur_crbr"); console.log(items);}
But in my console, items = null while there is a td with this id