I am trying to assign variables out of global scope and allow a included file with access to these vars. This is what I have:
<script type="text/javascript">
    (function(){
        var cm_url = "http://test.com/mikelbring/1313-myproducthere";
        var cm_text = "Buy";
        var z = document.createElement("script");
        z.src = "button.js";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(z, s);
    })();
</script>
The script doesn't have access to the vars. What can I do to give it access to the vars but keep them out of the global scope? Thanks!
 
     
    