javascript - How to call script via ajax crossdomain -


can me make request via ajax crossdomain?

what have:

$.ajax({         type: "post",         url: "/login.php",         data: {         email: document.loginform.email.value,         password: document.loginform.password.value,         }       }).done(function(msg){}); 

i'm calling https://m.domain.com/login.php - works. but, want call same script login.php on domain.com.

as guess i'm working on mobile version of website. want make post requests m.domain.com scripts situated on domain.com

using absolute address like: url: "https://domain.com/login.php", - no success..

i tried make url "/home/admin/web/domain.com/public_html/" ajax request.. still no result..

you should allow cors https://m.domain.com on https://domain.com/login.php.

like here


Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -