title: Passing values from multiple input fields to popup using javascript/jquery
body: <p>I am trying to pass multiple input fields to a popup page.
  Here's what I have done:</p>
  
  <pre><code>&lt;tr&gt;
  &lt;th&gt;Item Category&lt;/th&gt;
      &lt;td&gt;&lt;input type="text" name="object_category" disabled="disabled" id="pid1" /&gt;
      &lt;/td&gt;
  &lt;tr&gt;
  &lt;th&gt;Item Name&lt;/th&gt;
      &lt;td&gt;&lt;input type="text" name="object_name" disabled="disabled" id="pid2" /&gt;
      &lt;input type="button" id="item_name" name="choice" onClick="selectValue2('id2')" value="?"&gt;&lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>The value of  is filled up by returning its value from a different page.</p>
  
  <p>Now I want to pass the values of id: <code>pid1</code> and id:<code>pid2</code> to a new popup page using javascript.
  Here's my <code>selectValue2()</code> function definition:</p>
  
  <pre><code>function selectValue2(pid2){
      // open popup window and pass field id
    var category = getElementById('pid1');
      window.open("search_item.php?id=pid2&amp;&amp;cat="+category+""",'popuppage',
    'width=600,toolbar=1,resizable=0,scrollbars=yes,height=400,top=100,left=100');
  }
  </code></pre>
  
  <p>But, selectValue2 is not working, as popup is not opening. How to pass the values of these two fields to my new popup?</p>