title: liferay resource within included javascript file
body: <p>when i use this :</p>
  
  <pre><code>&lt;portlet:resourceURL var="ajaxURL" id="ajax" escapeXml="false" /&gt;
  
  
   $.ajax({
      method : "POST",
          url : "${ajaxURL}",
          data : {
      ...
  </code></pre>
  
  <p>inside my ajax call that is not included in page it works.</p>
  
  <p>but when i try to include that same javscript code on page i get error:</p>
  
  <pre><code>WARN  [http-bio-8080-exec-27][404_jsp:109] /$%7BajaxURL%7D
  </code></pre>
  
  <p>My question is how to pass that resource url to included javascript or how to generate it within javascript.</p>
  
  <p>i have tried:
  <code>var urlVar = '&lt;portlet:resourceURL var="ajaxURL" id="ajax" escapeXml="false" /&gt;'</code> </p>
  
  <p>and when i use urlVar on this way:</p>
  
  <pre><code>$.ajax({
  method : "POST",
      url : urlVar,
      data : {
  ...
  </code></pre>
  
  <p>It doesnt works. Does anyone knows how to solve this issue? Thanks</p>