This works fine in chrome and edge but Firefox says: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://192.168.1.146/webmail/?/Ajax/. (Reason: CORS header 'Access-Control-Allow-Origin' missing).
This is a security issue regarding the fact that the AJAX request is being made to a different domain adress , I advise trying to fix this instead. What will happen otherwise is browsers will try to prevent you from grabbing this data
This is a response header returned by the server, not a request header sent by the client.
If you don’t have access to change the server response, then you may not be able to request it across domains with ajax.
Chrome can be set up to disable web security, such as for when running in a local environment.
With CORS, basically you need the place you are requesting information from, to have that Access-Control-Allow-Origin setting in their header. If you have control over that, then get it done.
If you do not have control over that, you will need to ask them to add your server to their Access-Control-Allow-Origin
If they do not want to do that for you, then you’re stuffed, and other solutions need to occur instead such as using PHP to fetch the information instead, which is outside the purview of us here in this JavaScript channel. The PHP channel should be able to help with that instead.