Looking for a bit of help please.
I need to check that a input is filled out then if the user leaves the screen to the tabs or back button etc then the post request happens.
sendSMS: function(e) {
if(this.to) {
this.$http.post('/demo/send', message)
}
}
I need something to say when the input is not empty and if the user leaves the site area screen, i.e goes up towards the tabs or back button, then do the post request. So there will be no button been pressed to submit this, but rather than a check to see if the input is filled out and if the user leaves the screen.
How would I do this using VueJS in the above method I'm using?