Making call from a form.html by routes.js
how can I capture the input information of this form?
I created a new .js file and made the link in index.html …
But when I click the form button it does not call that .js I created!
Where is the declaration error in this?
beginning and end of the form
</form>
</div>
<div class="block block-strong">
<p class="row">
<a href="#" id="btnSalvar" class="col button button-big button-raised" >Salvar</a>
<a href="#" class="col button button-big button-fill button-raised" id="btnCancelar">Cancelar</a>
</p>
</div>
.js
var myApp = new Framework7();
var $$ = Dom7;
$$(’#btnSalvar’).on(‘click’,’.button-raised’, function () {
//var formData = app.form.convertToData(’#form-user-content’)
var nameInput = $$(’#nameInput [name=“nameInput”]’).val();
var ageInput = $$(’#ageInput [name=“ageInput”]’).val();
var formData = { name: nameInput, age: ageInput }
console.log(formData);
alert(JSON.stringify(formData))
// firebase.database().ref().child(‘usuarios’).push(formData);
firebase.database().ref().child(‘usuarios’).push(JSON.stringify(formData))
});