These are my first steps on Visual Studio and Cordova. I tried to insert data in a database (running through uwamp port 80) thanks to cordova (port 4400). My index file is loaded, i fill my form and post it but it says that my php file (the one called in ajax) is not found!
html:
<input type="button" id="poster" value="Poster l'offre de team" />
js:
var button = document.getElementById('poster');
button.addEventListener('click', validAjoutOffre);
function validAjoutOffre() {
var pseudo = document.getElementById('pseudo').value;
var plateforme = document.getElementById('plateforme').value;
var telephone = document.getElementById('telephone').value;
var lvlmini = document.getElementById('lvlmini').value;
var commentaire = document.getElementById('commentaire').value;
var legende = document.getElementById('legende').value;
$.ajax({
type: "POST", //Request type
url: "http://localhost:4400/validoffreteam.php",
data:{ pseudo: pseudo, plateforme: plateforme, telephone: telephone, lvlmini: lvlmini, commentaire: commentaire, legende: legende},
cache:false,
success:function (data) {
window.location.href = 'validajoutoffre.html';
}
});
}
The error is: jquery.js:9601 POST http://localhost:4400/validoffreteam.php 404 (Not Found)
The address http://localhost:4400/validoffreteam.php is correct and it downloads me the php file when i go on it.
What can be the problem?
Regards, Archetype