javascript - Xamarin.forms hybrid webview call remote PHP script -


i'm working on xamarin.forms app , i'm doing authentification system. when app launched, shows hybrid webview loading local register.html page. user fill form when submits, js code verify entries format correct... have js function verify if mail address provided user correct. that, calls remote php script (http://localhost/openchatweb/ismailalreadytaken.php?mail=email) return if yes or no, mail assigned user in database.

the problem here, php script not in same domain register.html page in local. found codes on internet works when launch page on local web browser not in app... hybrid webview seems ignore calls.

below code i've tried using ajax , works on local browser :

   function ismailalreadytaken(email)    {        $.ajax({              url:"http://localhost/openchatweb/ismailalreadytaken.php?mail=" + email,              datatype: 'jsonp',              success:function(json){                   if(json == "success")                  {                     return true;                  }                  else                  {                     return false;                  }              },              error:function()              {                  alert("an internal error has occured.");              }       });     } 

this works well:

   function ismailalreadytaken(email)    {        $.get("http://localhost/openchatweb/ismailalreadytaken.php?mail=" + email).done(function (data) {               if(data == "success")              {                 return true;              }              else              {                 return false;              }         });    } 

i don't know problem, think ios/android don't allow access remote script because of security... has achieve before , can me?


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -