Pervez Mulla wrote:
> In my code I want to pass all the items(values)present
> in select list to backend, Am trying to do that but am
> not getting exact result.
>
> Now am able to pass only one item(value) to back-end,
> Instead of that I want to pass all the value whichever
> present in select list.
Non-selected values can't be retrieved by the receiving script, because they are simply not passed in the POST/GET request.
One possible workaround is to select everything in the box just before the submit-action:
<form method="get" action="script.php" name="f"
onSubmit="
for (var i=0; i<document.f.fruit.options.length; ++i)
document.f.fruit.options[i].selected = true;
">
<select multiple="multiple" name="fruit" size="3">
<option value="apple">apple</option>
<option value="pear">pear</option>
<option value="orange">orange</option>
</select>
<input type="submit">
</form>
Hope this helps,
--
Bart