title: Add values from dialog popup to parent page dynamically
body: <p>Okay, I know what I need to do...I just can't figure out how to write it. Basically, I have a parent page with a table of categories (let's say colors, numbers, letters). These categories are the fathers of the table. The sons are red, blue, 56, 72, abc, def and so on. I have a nyroModal dialog pop up with drop downs to add new rows to this table. I successfully have new rows added, with the correct drop down values added to the parent table on click of my save button but not under the correct "father". They just add to the end of the table. One of the drop downs in the pop up holds the options to the father categories (select name="chooseFather"), this is the only value I can't figure out how to pass. </p>
  
  <pre><code>&lt;select name="chooseFather"&gt;
  &lt;option value="Colors" id="father3"&gt;Colors&lt;/option&gt;
  &lt;option value="Numbers" id="father4"&gt;Numbers&lt;/option&gt;
  &lt;option value="Letters" id="father5"&gt;Letters&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>Each of the parent drop down values have an individual id, that match the id of the parent rows. I need something like a dynamic version of <code>$(“#parentId”).children().add(your new children)</code> to capture the chosen drop down value, and place the correct son values in the corresponding part of the table. Here is the code of my save button that transfers my values to the parent table/page.</p>
  
  <pre><code>("img.save").click(function () {            
  
              for(var j=0;j&lt;document.getElementsByName("shoreInfo").length;j++) {
                  parent.updateParent1(document.getElementsByName("select1").item(j).value + '&amp;nbsp;' +
                                       document.getElementsByName("text1").item(j).value + '&amp;nbsp; - ' +
                                       document.getElementsByName("select2").item(j).value,
                                       document.getElementsByName("chooseFather").item(j).value);
  
              }
              parent.$.nmTop().close();
          });
  </code></pre>