I'm trying to replace link parameters with the query strings and I'm a noob when it comes to web dev
I've tried String(), object.textContent() and some more things but can't seem to get what I want
here's my code:
link="https://someWebsite?phone=replace1&message=replace2"
link = link.replace("replace1",phone); //phone is an input box returned by document.getElementByID() method
link = link.replace("replace2",message); //message is a text area returned by document.getElementByID() method
expected link: https://someWebsite?phone=123456&mesaage=somemessage
actual link: https://someWebsite?phone= [object HTMLInputElement]&message=[object HTMLTextAreaElement]