I am developing an SAP BSP web application that includes a form with a submit button. When I manually click the button everything works fine, the round trip to the server is made.
Now in certain situations I want to call this submit button via JavaScript, so I do a simple
document.getElementById('MyButton').click( );
On the first sight this seems to work fine, again the round trip is being made. However, internally in the SAP web framework this does not behave exactly the same as manually clicking the submit button. It seems some parameters are not set or at least set differently.
I am not sure yet what exactly the difference is, as I am not fully aware how the SAP framework does its things (debugging it at the moment). But in order to better find the issue I would like to know:
From a technical perspective, what is the difference in manually clicking a HTML form submit button to calling the button's click()
method via JavaScript?