Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Hi there seems to be a simpler way to do it. I've put my code below. The base version of uplodify is from here <a href="http://www.startutorial.com/articles/view/21" rel="nofollow">http://www.startutorial.com/articles/view/21</a></p> <p>Now what I've done is I am getting the values for <strong>folder</strong> from a variable. And then I load the uploadify function everytime I click the lists item below, these list items are foldernames inside the root upload directory. So when i click them i get that name and append it to the actual folder path and call the uploadify again.</p> <p>But then if i keep calling it again and again, there will be more browse buttons appeding on the screen so I just removed the element #file_uploadUploader before calling the uploadify. So i guess the problem is solved. at least for me :)</p> <p>Been searching for this for the past two days but finally feels good to solve it myself. B-)</p> <hr> <p>HTML</p> <pre><code>&lt;input id="file_upload" name="file_upload" type="file" /&gt; </code></pre> <ul> <li>jerry1</li> <li>jerry3</li> <li>jerry2</li> </ul> <hr> <p>Jquery</p> <pre><code>$(document).ready(function() { var uploadfer = 'uploads/jerry2'; $("ul li").click(function(){ uploadfer = "uploads/"+$(this).text()+"/"; alert(uploadfer); $('#file_uploadUploader').remove(); $('#file_upload').uploadify({ 'uploader' : 'js/uploadify.swf', 'script' : 'upload.php', 'cancelImg' : 'js/cancel.png', 'folder' : uploadfer, 'auto' : true }); }); $('#file_upload').uploadify({ 'uploader' : 'js/uploadify.swf', 'script' : 'upload.php', 'cancelImg' : 'js/cancel.png', 'folder' : uploadfer, 'auto' : true }); }); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload