title: Combining javascript / jQuery and PHP
body: <p>I'm using Uploadify to upload an image. Now I need to get the correct upload path.</p>
  
  <p>I have the following code / script:</p>
  
  <pre><code>  &lt;?php
      $uploadifyPath = get_bloginfo('url') . '/wp-content/plugins/uploadify/';
      $galleryPath = "'".getGalleryURL('1620')."'"; // &lt;--- 1620 is inputed by me. 
    ?&gt;
  
    &lt;input id="galleryID" type="hidden" value="1620" name="galleryID"/&gt;
    &lt;input id="fileInput" name="fileInput" type="file" /&gt;
  
    &lt;script type="text/javascript"&gt;// &lt;![CDATA[
      $(document).ready(function() {
        $('#fileInput').uploadify({
            'uploader'  : '&lt;?php echo $uploadifyPath ?&gt;uploadify.swf',
            'script'    : '&lt;?php echo $uploadifyPath ?&gt;uploadify.php',
            'cancelImg' : '&lt;?php echo $uploadifyPath ?&gt;cancel.png',
            'auto'      : true,
            'folder'    : &lt;?php echo $galleryPath ?&gt;
        });
      });
    // ]]&gt;&lt;/script&gt;
  </code></pre>
  
  <p>How can I, with jQuery, get the value of galleryID and input it into my function <code>getGalleryURL()</code> ?</p>
  
  <p>Or... is there a better way to do this??</p>