>I have another question. There is another button on that form of type submit which becomes available when the value is selected.
>
>Do you think if I try to programmatically call the click of that button, the form will submit or most likely not?
>
>In other words, for now I changed the type of my button back to button but I need to somehow figure a way to submit the form after the original code of that button is executed and the value is selected.
You can programmatically create and\or click a submit button.