How to put var url in javascript?
<p>I have made a declaration like this in php (taken from <a href="http://stackoverflow.com/questions/5221630/wordpress-path-url-in-js-script-file">wordpress path url in js script file</a>):</p>

<pre><code>&lt;script type="text/javascript"&gt;
    var templateurl = "&lt;?php bloginfo('template_url') ?&gt;";
&lt;/script&gt;
</code></pre>

<p>then i have this code in my javascript (myjava.js):</p>

<pre><code>init : function(ed, url) {

        ed.addCommand('mcearrow_shortcodes', function() {
            ed.windowManager.open({
                file : url + '/interface.php',
                width : 410 + ed.getLang('arrow_shortcodes.delta_width', 0),
                height : 250 + ed.getLang('arrow_shortcodes.delta_height', 0),
                inline : 1
            }, {
                plugin_url : url
            });
        });


        ed.addButton('arrow_shortcodes', {
            title : 'arrow_shortcodes.desc',
            cmd : 'mcearrow_shortcodes',
            image : url + '/btn.png'
        });


        ed.onNodeChange.add(function(ed, cm, n) {
            cm.setActive('arrow_shortcodes', n.nodeName == 'IMG');
        });
    }, 
</code></pre>

<p>I want to change all the 'url +' with templateurl, I've tried to use this:</p>

<pre><code> file : templateurl + '/includes/scripts/interface.php'
</code></pre>

<p>But it doesn't work. It doesn't load the interface.php. However, if I use 'url +', the interface.php is loaded perfectly.
Problem is, I want to put my interface.php in different folder. Not in the same folder where myjava.js is located.</p>

<p>What's the correct way to use my templateurl variable? </p>

<p>Many thanks!</p>
