Home Ask Login Register

Developers Planet

Your answer is one click away!

dipanshu February 2016

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);

On add in footer variable s is coming null. so giving error in all browsers and phone numbers are not changing.


How can i resolve it . Please need fix asap


vtz February 2016

Try with the below instead of var s = document.getElementById("script")[0];

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

Post Status

Asked in February 2016
Viewed 1,005 times
Voted 12
Answered 1 times


Leave an answer

Quote of the day: live life