Reputation: 30
I want to trigger a phone call through my website but I don't want it to be displayed on the Phone call native App. I used href="tel:555676876" but it will redirect me to the Call App instead of calling straight up. Is there a javascript code for this apart from "window.open('tel:*901%23');"
Upvotes: -1
Views: 1353
Reputation: 89
I was looking something else and found your question. Passed a long time since your question
You can do it via jQuery and e.preventDefautl()
<script>
jQuery('body').on('click', 'a[href^="tel:"]', function(e) {
e.preventDefault();
console.log('clicked phone');
});
</script>
Upvotes: 0
Reputation: 1812
No.
If this was possible, it would have been quite a security risk, as web sites could start unsolicited calls to fraud numbers.
Upvotes: 2
Reputation: 4640
Hiding phone number may not be possible.
<a href="tel:5551234567">Call</a>
One click should open the phone dialler and input the number to be called.
Upvotes: -1