I created a form as follows:
<form>
<input type="text" id="mssgbox" />
<button onclick="send()> Send </button>
</form>
and a script:
function send(){
let typedText = document.querySelector('#mssgbox').value;
window.location.href = 'https://api.whatsapp.com/send?phone=2347034907106?text='+typedText;
}
Is there any method i can use to send the Typed text directly to whatsapp (in background) without being redirected to whatsapp!?
If yes, Please How ?
You can't do it this way. (html & js) For this, you need to look for the api and implement it in the back-end. As far as I know, there is no api for regular account. Maybe you can find api for business accounts.