NaMaan
September 5, 2009, 9:40pm
1
I want to POST the multiple selection listbox with all the values in it. The values in the listbox are NOT selected. They are coming from a different listbox.
Code in Form
<select name="SecondList]" size="10" multiple id="SecondList" style="width:250"></select>
I am handling in PHP. This code gives me whole array if everything is selected in the list. But I want the whole list even if nothing is selected.
$myflex->set_oG($_POST'SecondList']);
Any help will be appreciated.
Thanks.
NaMaan
September 6, 2009, 12:34am
2
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;
}
}
sheyn
September 6, 2009, 1:11am
3
Re: Post whole ListBox - PHP
***What on earth ARE you talking about
maroush
September 6, 2009, 2:52pm
4
Re: Post whole ListBox - PHP
I need to improve my PHP skills :hinna:
Re: Post whole ListBox - PHP
Sheyn, I think he needs some magic syn-dust