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

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -