I've added check boxes to a table view on my app with a custom submit button. I'd like to trigger a mail with the list of selected records from the Custom Javascript Console but I'm unable to.
I tried sending the info to a PHP script on our website trait but am getting the following error:
XMLHttpRequest cannot load email.php. No 'Access-Control-Allow-Origin' header is present on the requested resource.
How can I go about doing this?
Hi Saleem -
It sounds like you are attempting an XMLHttpRequest to a different domain than one the code is on. So, the browser is blocking it as it usually only allows a request in the same origin for security reasons.
If you include that information in the header when doing a cross-domain request, this should allow your request through.
I know you also have an chat conversation going with us on this topic and feel free to provide any further details in that thread if needed.
Thanks!