0

How to get form data from any form on any web page and how to know that the form is submitted? Plz help me out.

what I am trying to do is that I am making a chrome extension which gets all the form data and checks if the form was submitted or not. my try is something like this(using jquery): //for checking if the form was submitted or not $('form').submit(function(e){ e.preventDefault(); //some ajax stuff i will be doing for authentication console.log('submitted'); }); //this is for getting form data. let m=$('form'); let n=m.attr('type'); for(let i=0;i<m.length;i++){ if(n[i]=="password" || n[i]=="text" || n[i]=="email"){ console.log(m[i].value); } } ************************ my problem: when I'm running this its working fine on schoolofai.com, facebook.com, etc but it is not working on Twitter and Instagram login and many other logins as well. in twitter login, the submit detection is not working and in Instagram both the input detection and submit detection not working. is there any effective way of doing this for any kind of form on any webpage. if so then plz help me out .

6th Sep 2018, 9:41 AM
S O U ✌️ I K
S O U ✌️ I K - avatar
1 Resposta
+ 3
can you attach the code here to understand better
9th Nov 2020, 7:17 AM
Queen👽
Queen👽 - avatar