        } else {
                alert('Your browser does not support local storage');
            }
        });

        $('body').on('click', '.send', function(e) {
            e.preventDefault();
            var form = $(this).closest('form');
            //added /g to get all the matched params instead of only first
            var matchedParamsInRoute = $(form).attr('action').match(/[^{]+(?=\})/g);
            var theId = $(this).attr('rel');
            //keep a copy of action attribute in order to mo