Post whole ListBox - PHP

Re: Post whole ListBox - PHP

Ok I been able to find one solution to it.

Using Javascript I should select the whole Listbox before I submit and call this function on 'onClick' of 'submit'.



<input name="btnProject" type="submit" value="Submit New Project" onClick="selectAll(this.form.SecondList);">


This is the function to select the whole listbox.



function selectAll(box) {
    for (var i = 0; i < box.length; i++) {
        box*.selected = true;
    }
}