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

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -