javascript - Script for changing numbers giving error -


<script type="text/javascript">     var adiinit = "xxxx",         adirvo = true;     var adifunc = null;     (function () {         var adisrc = document.createelement("script");         adisrc.type = "text/javascript";         adisrc.async = true;         adisrc.src = ("https:" == document.location.protocol ? "https://static-ssl" : "http://static-cdn") + ".responsetap.com/static/scripts/rtaptrack.min.js";         var s = document.getelementbyid("script")[0];         s.parentnode.insertbefore(adisrc, s);     })(); </script> 

on add in footer variable s coming null. giving error in browsers , phone numbers not changing.

http://prntscr.com/a0k1vt

how can resolve . please need fix asap

try below instead of var s = document.getelementbyid("script")[0];

var s = document.getelementsbytagname("script")[0]; 

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -