title: How to access a Div inside a repeater using javascript
body: <p>Simply, I have an anchor inside a repeater that triggers on click a javascript function, which sets the innerHTML of a Div to some content.</p>
  
  <p>trying this outside a repeater did work!
  but if I tried to implement the same code in the repeater's item template, it won't work!</p>
  
  <p><strong>NOTE:</strong> I think I need to access the repeater first then access the Anchor inside it! but I don't know how to do it</p>
  
  <p>For further illustration: </p>
  
  <p>JavaScript Function: </p>
  
  <pre><code>function show(ele, content) {
      var srcElement = document.getElementById(ele);
      if (srcElement != null) {
          srcElement.innerHTML = content;
      }
  }
  </code></pre>
  
  <p>The repeater's code: </p>
  
  <pre><code>&lt;asp:Repeater ID="Repeater1" runat="server" &gt;
      &lt;ItemTemplate&gt;
          Name : &lt;%# Eval("name")%&gt;
          &lt;DIV ID= "PersonalInfo1" runat="server"&gt;&lt;/DIV&gt;
          &lt;A id="A1" href="#" runat="server" onclick="show('PersonalInfo1','Address : ')"&gt;More...&lt;/A&gt;
      &lt;/ItemTemplate&gt;
  &lt;/asp:Repeater&gt;
  </code></pre>
  
  <p><strong>PS: THE POSTED CODE ISN'T WORKING IN THE REPEATER!</strong></p>