title: PHP file upload inside modal window
body: <p>I have been searching the Internet for days with no luck. I need a modal window to upload a file and pass additional values to the script. The modal window needs to open when the user clicks on "This is Question #".  Below is my current script. Any help or direction would be greatly appreciated.</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta charset="utf-8"&gt;
  &lt;title&gt;Untitled Document&lt;/title&gt;    
  &lt;style&gt;
      ul {
          list-style: none;
          margin: 0;
          padding: 0;
      }
  
      li {
          /*background-image: url(/images/page.png);*/
          background-position: 0 1px;
          background-repeat: no-repeat;
          padding-left: 20px;
      }
  
      a {
          color: #000000;
          cursor: pointer;
          text-decoration: none;
      }
  
      a:hover {
          text-decoration: underline;
      }
  
      .hidden {
      display:none;
      }
  &lt;/style&gt;
  &lt;script src="/js/jquery-1.11.1.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript"&gt;
          function addLine(what) {
              $("#" + what).append('&lt;li&gt;URL to uploaded document&lt;/li&gt;');
          };
  
          function myToggle(what){
              $("#" + what).toggleClass('hidden');
          };
  &lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
      &lt;ul&gt;
          &lt;li class="folder"&gt;
              &lt;a href="#" onClick="myToggle('Test1');"&gt;Test&lt;/a&gt;
              &lt;ul class="hidden" id="Test1"&gt;
                  &lt;li class="folder"&gt;
                      &lt;a href="#" onClick="myToggle('Test1-2');"&gt;Test1-2&lt;/a&gt;
                      &lt;ul class="hidden" id="Test1-2"&gt;
                          &lt;li&gt;
                              &lt;a href="#" onClick="addLine('Question1');"&gt;This is Question 1&lt;/a&gt;
                              &lt;ul id="Question1"&gt;&lt;/ul&gt;
                          &lt;/li&gt;
                          &lt;li&gt;
                              &lt;a href="#" onClick="addLine('Question2');"&gt;This is Question 2&lt;/a&gt;
                              &lt;ul id="Question2"&gt;&lt;/ul&gt;
                          &lt;/li&gt;
                          &lt;li&gt;
                              &lt;a href="#" onClick="addLine('Question3');"&gt;This is Question 1&lt;/a&gt;
                              &lt;ul id="Question3"&gt;&lt;/ul&gt;
                          &lt;/li&gt;
                      &lt;/ul&gt;
                  &lt;/li&gt;
              &lt;/ul&gt;
          &lt;/li&gt;
      &lt;/ul&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>