This seems really stupid i cant get my head around this.

I have a listbox that has items added to it from selections from another one. I have also added code that an item can be double clicked to remove it, which works, until the page is refreshed and the items all com back.

my code is

function DeleteItem()
    var list = document.getElementById("lstSelected");
     var len = list.options.length;
    var i = 0;
    for (i = 0; i < len; i++)


I wondered if anyone had any ideas

many thanks

Your problem is coming from the fact that the server doesn't know what the client side is doing. You need to save the state of the list box (using SQL or a file) and update that state, through an ajax call or form submit, anytime the client side makes a change to the list box. Here is a tutorial on ajax to get you started.