Adding a call button with telephone number from textbox.

I am making a contact list as a trail app, and have a "Details page" which displays the clicked contacts contact details. I would like to add a call button that selects the phone number out of an input box and sends it to the phone's dialler.

I added window.location.href='tel:999999999' to the click event of a button, and it worked. But when I tried to use window.location.href='tel:'+ document.getElementById("CallBtn").value Nothing fires at all. What am I doing wrong?
1 person has
this question
This topic is no longer open for comments or replies.