Philippe,
I'm entirely at a loss what you want to do, but it's interesting to get it to work anyway. Two changes are needed. First, you can't set a list's selection's index to null: you need to set the list's selection to null. Second, setting the list's selection to null is a change to that list which is captured by list.onChange. Therefore, what you in effect do is set the selection to null and then immediately ask what the selection is. Here is what I think is the solution to your problem:
list.onChange = function () { if (list.selection != null ) { alert (list.selection.index); } list.selection = null; // ré-initialisation de la selection}
Peter