I have a web input form and the form has a SELECT input element. I'm using the CGI module to get the values selected in the SELECT element.
@selected_options = $cgi->param( 'select_name' );
@selected_options would typically contain the values of selected options( like 1,2,3 etc ). I'm getting the string "[ object HTMLInputElement ]", which I guess is the stringified Option object.
I should mention that the SELECT options have been dynamically added using the following Javascript function.
function addOption(object,text,value) { var optionName = new Option(text, value) object.options[object.length] = optionName; object.options[object.length-1].selected = false; }
Is it possible to add the option in a different fashion so that param would return the value or is there a different way to use param() to get the value from the Option object.
Thanks in advance for your time.
In reply to CGI param returns HTMLInputElement. by lanta
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |