I tried this:
this.model.lbLayoutId = selectedValue;
const button = $("#generateLabelButton")
if (button)
{
button.click();
}
But nothing happened (e.g. my code from the button was not executed). Also, not clear if that button was really found properly and not empty object was created instead.
>>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.
If it's not broken, fix it until it is.
My Blog