diff --git a/app/view/Includes/header.include.html b/app/view/Includes/header.include.html index 749f42115e097f001b0d9ee93545fbbac13e98ed..7aacafa77cabdfa7417418c51f9e1511958995a9 100644 --- a/app/view/Includes/header.include.html +++ b/app/view/Includes/header.include.html @@ -15,6 +15,7 @@ if(!isset($_SESSION)) { // si <link href='https://fonts.googleapis.com/css?family=Work+Sans' rel='stylesheet' type='text/css'> + <script>var BASE_URL = 'http://localhost/projet-web-2016/www';</script> <script src="<?php echo BASE_URL; ?>/js/jquery.min.js"></script> <script src="<?php echo BASE_URL; ?>/js/jquery.auto-complete.min.js"></script> <script src="<?php echo BASE_URL; ?>/js/autocompletion_form_jeux.js"></script> @@ -30,7 +31,7 @@ if(!isset($_SESSION)) { // si </div> <div class="search-bar-conteneur col-3 col-m-3"> - <form method="post" name="nomJeu" class="pure-form"> + <form method="post" action="<?php echo BASE_URL; ?>/jeu" name="nomJeu" class="pure-form"> <input type="text" class="search-bar" id="rechercheJeu" name="rechercheJeu" placeholder="Rechercher un jeu..." /><input type="submit" class="search-button" value=""/> </form> diff --git a/www/js/autocompletion_form_jeux.js b/www/js/autocompletion_form_jeux.js index 3255ac59b89224a597fc7df272e3d58f24b8501e..b51f6a7238f10c56bd53ceff191b409bd74b5599 100644 --- a/www/js/autocompletion_form_jeux.js +++ b/www/js/autocompletion_form_jeux.js @@ -6,7 +6,7 @@ function loadJsonJeux(value) { $.ajax({ dataType: 'json', type: 'POST', - url: 'jeux', + url: BASE_URL+'/jeux', data: params, success: function(resp) { for (var x = 0; x < resp.length; x++) {