title: XMLHttpRequest dynamic callback function name
body: <p>I have a XMLHttpRequest with a funtion callback that I would like to make unique.</p>
  
  <pre><code>var i = "https://itunes.apple.com/search?type=jsonp&amp;term==" + encodeURI(artist) + "-" + encodeURI(song) + "&amp;media=music&amp;limit=1&amp;callback=" + instanceName + "parseImage";
              try {
                  document.documentElement.removeChild(scr_tag)
              } catch (t) {}
              try {
                  scr_tag = document.createElement("script"), scr_tag.src = i, document.documentElement.appendChild(scr_tag)
              } catch (t) {}
  </code></pre>
  
  <p>From <a href="https://affiliate.itunes.apple.com/resources/documentation/itunes-store-web-service-search-api/" rel="nofollow noreferrer">https://affiliate.itunes.apple.com/resources/documentation/itunes-store-web-service-search-api/</a></p>
  
  <p>Note: When creating search fields and scripts for your website, you should use dynamic script tags for your xmlhttp script call requests. For example:</p>
  
  <pre><code>&amp;lt;script src="https://.../search?parameterkeyvalue&amp;amp;callback="{name of JavaScript function in webpage}"/&amp;gt;
  </code></pre>
  
  <p>How would I construct a dynamic callback function name, this case instanceName (variable) + "parseImage"? </p>