A. Macanthony
A. Macanthony

Reputation: 30

HTML - is it possible to trigger a direct phone call from a website without displaying the phone number on a mobile device?

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

Answers (3)

Sak
Sak

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

Tsahi Asher
Tsahi Asher

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

Edison D&#39;souza
Edison D&#39;souza

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

Related Questions