this.form.submit()onchange with select

I've been using:

<select id="myselect" data-native-menu="false" onchange="this.form.submit()">

Using the onchange to get the value of the select (it returns as ID), and then using that ID i can go into my database.

No issues when running on Firefox. So i click on the dropdown, click on an item, the page gets the ID, puts it into a query and displays a table specific to the returned ID. All of this is done within the onchange. However, this only works on Firefox but not on Chrome or Safari.

On Chrome and Safari, what happens is when i select the drop down and then select an item (option), nothing happens. It should change the existing table I have with new values but it doesn't. I know it won't be an issue with my code on the server side. This could be an issue regarding Javascript but i'm not too sure.

Any and all help will be much appreciated :)

I suggest you to try this, it works for me.

<select id="myselect" data-native-menu="false" onchange="formSubmit('formId')">

And the Javascript as below:

function formSubmit(formId) {
  var thisForm = document.getElementById(formId);
  if (thisForm) {
    thisForm.submit(); 
  }

}