<commit_before>$(document).ready(function() 
{
    /*POST request to try to connect the user*/
    $("#valid").click(function(event)
    {
        //var formOK = (document.getElementById('input_email').value != "") && (document.getElementById('input_room').value != "")
        var formOK = true;
        if(formOK)
        {
                $.post(
                        "http://foodlidays.dev.innervisiongroup.com/api/v1/login",
                        {  email : "<EMAIL>", //a remplacer par les valeurs des champs
                            room_number : "50NG13HS" },
                        function(data) 
                        {     
                            //$('#res').html(data); to change text in html page
                            alert(data.room.street_address);
                            window.open("main.html");
                        },
                        "json"
                    );
        }
        else alert("Both fields are required");
    });
});

$(window).on("navigate", function (event, data) {
  var direction = data.state.direction;
  if (direction == 'back') {
    alert("back");
  }
  if (direction == 'forward') {
    // do something else
  }
});
<commit_msg>input field management ok<commit_after>$(document).ready(function() 
{
    /*POST request to try to connect the user*/
    $("#valid").click(function(event)
    {
        var formOK = (document.getElementById('input_email').value != "") && (document.getElementById('input_room').value != "")
        if(formOK)
        {
                $.post(
                        "http://foodlidays.dev.innervisiongroup.com/api/v1/login",
                        {  email : "<EMAIL>", //a remplacer par les valeurs des champs
                            room_number : "50NG13HS" },
                        function(data) 
                        {     
                            //$('#res').html(data); to change text in html page
                            alert(data.room.street_address);
                            window.open("main.html");
                        },
                        "json"
                    );
        }
        else alert("Both fields are required");
    });
});

$(window).on("navigate", function (event, data) {
  var direction = data.state.direction;
  if (direction == 'back') {
    alert("back");
  }
  if (direction == 'forward') {
    // do something else
  }
});

{'fraction_non_alphanumeric': 0.1444582814445828, 'fraction_numerical': 0.004151100041511001, 'mean_word_length': 1.386138613861386, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7268716', 'n_tokens_mistral': 639, 'n_tokens_neox': 616, 'n_words': 128}