Jump to content

dflow

Members
  • Content Count

    631
  • Joined

  • Last visited

Community Reputation

0 Neutral

About dflow

  • Rank
    Prolific Member

Profile Information

  • Gender
    Not Telling
  1. iDiv.appendChild(innerDiv); was causing the error
  2. obviously I did, but then: document.getElementById("5050").src ="http://example.com/tracker/"+ a +'/' + b; isn't executed for some reason
  3. This code works: How can I execute this in one script tag? <script> var urlParams; (window.onpopstate = function () { var match, pl = /\+/g, // Regex for replacing addition symbol with a space search = /([^&=]+)=?([^&]*)/g, decode = function (s) { return decodeURIComponent(s.replace(pl, " ")); }, query = window.location.search.substring(1); urlParams = {}; while (match = search.exec(query)) urlParams[decode(match[1])] = decode(match[2]); })(); var a = urlParams["a"]; var b = urlParams["b"]; // var url = "http://example.com/tracker/"+ a +'/' + b; var iDiv = document.createElement('img'); iDiv.id = '5050'; iDiv.src = +url; iDiv.width = '14'; iDiv.height = '14'; document.getElementsByTagName('body')[0].appendChild(iDiv); iDiv.appendChild(innerDiv); </script> <script> document.getElementById("5050").src ="http://example.com/tracker/"+ a +'/' + b; </script>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.