title: Xpages Get ID of a Panel inside a repeat control
body: <p>I have a Panel inside a repeat control that I'm trying to pull the inner HTML from when a button is clicked? I have tried the code below but it is not working because the html rendered ID is different when I launch the page in a browser.</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;xp:view xmlns:xp=&quot;http://www.ibm.com/xsp/core&quot;
  xmlns:xe=&quot;http://www.ibm.com/xsp/coreex&quot;&gt;
      &lt;xp:repeat id=&quot;repeat1&quot; rows=&quot;30&quot; value=&quot;#{javascript:getNames();}&quot; var=&quot;rowData&quot; style=&quot;width:100%&quot;&gt;
          &lt;xp:panel id=&quot;pnlReport&quot;&gt;
          &lt;xp:table style=&quot;width:100.0%&quot;&gt;
                  &lt;xp:tr&gt;
                      &lt;xp:td&gt;
                          &lt;xp:label value=&quot;#{javascript:rowData.Name}&quot; id=&quot;label3&quot;&gt;&lt;/xp:label&gt;
                      &lt;/xp:td&gt;
                  &lt;/xp:tr&gt;
              &lt;/xp:table&gt;
              &lt;/xp:panel&gt;
          &lt;/xp:repeat&gt;
  
      &lt;xp:button value=&quot;GET INNER HTML&quot; id=&quot;button1&quot;&gt;
          &lt;xp:eventHandler event=&quot;onclick&quot; submit=&quot;false&quot;&gt;
              &lt;xp:this.script&gt;&lt;![CDATA[var el = XSP.getElementById('#{id:pnlReport}'); alert(el.innerHTML);]]&gt;
              &lt;/xp:this.script&gt;
          &lt;/xp:eventHandler&gt;
      &lt;/xp:button&gt;
  &lt;/xp:view&gt;
  
  </code></pre>