Hi,
I have a call button and sms button which used to work. However, recently i made some changes to other components and realised that this window.location.href='tel:93205858'; doesn't work anymore.
May I know whether I did anything wrong?
Thanks!
Hi,
I have a call button and sms button which used to work. However, recently i made some changes to other components and realised that this window.location.href='tel:93205858'; doesn't work anymore.
May I know whether I did anything wrong?
Thanks!
window.location.href = “tel:+375292771265′′;
Clicking on that button will open the dialer with pre-populated phone number:
You wana try the + in front?
iOS has some nuances when dialer or sms window should be opened. Try to use such code for iOS platform:
window.open(‘tel:+375292771265′, ‘_system’);
I am a newbie too but just hoping that helps ![]()
Cheers,
M&M
Hi,
Thanks for the reply!
However, adding the + doesn't work for me. Seems like my buttons events do not reach that line of code. I tried using an alert and it was triggered though.
hi,
Then could it be the permissions? But then the best bet will be to move the code to just ahead of the alert box - first to confirm that there is no problem in invoking the dialer, or the messaging. Then you'll need to investigate the cause as to what is breaking the code. Console to the rescue? ![]()
Cheers,
M&M
Hi,
Please check whether there are errors in browser console.
Hi Alena,
I received this javascript error from firefox when i tried window.location.href='sms:87705858' :
NS_ERROR_UNKNOWN_PROTOCOL:
The call function window.location.href = “tel:+375292771265′′; is triggered in my browser but not responding when installed in my android phone.
Is there other way to troubleshoot? thanks.
I noticed some new permissions for android. Could it be the reason?
Thanks
Hi,
I tried giving all android permissions and the test app in my browser did trigger skype application.
However, when i installed in my android phone, it doesn't trigger the dialer.
Anyone has an idea how can i resolve this?
Thanks.
Hi wei,
Could you please show the code that you're using for triggering skype app?
Hi,
I used the following JavaScript at button click event:
window.location.href = “tel:+375292771265′′;
Can't seem to trigger it on my phone.