Programmatically clicking a link in android browser using Javascript -
i'm trying click on dynamically created click-to-call link in android browser, nothing happen.
create element:
var link = document.createelement('a'); link.href = "tel:+1-303-499-7111";
then event , fire click:
var evt = new mouseevent("click"); link.dispatchevent(evt);
or even
link.click();
it works fine on chrome's mobile mode , ios device, doesn't work in android browser. if create element in html <a href="tel:+1-303-499-7111">+1 (303) 499-7111</a>
, click manually, working
Comments
Post a Comment