title: How to use onclick method inside AEM component
body: <p>Am having a AEM6 html component, am getting the values from dialog and using it inside the component via the .js file and using the return properties.</p>
  
  <p>I could able to get the authored values but it is getting null or empty when am using it inside the onclick method. Please find below the code snippet below.</p>
  
  <pre><code>&lt;div data-sly-unwrap data-sly-use.test="test.js"&gt;&lt;/div&gt;
  
  &lt;a href="#" class="${test.testId}" id="${test.testId}" onClick="toggleDraw('${test.testId}')" &gt;
  </code></pre>
  
  <p>The content I authored is getting displayed in class and Id, but it is not displaying in the  onClick method.</p>
  
  <p>Below is the Output am getting after authoring.</p>
  
  <pre><code>&lt;a href="#" class="get-a-quote" id="get-a-quote" onClick="toggleDraw('')" &gt;
  </code></pre>
  
  <p>Output I needed is :</p>
  
  <pre><code>&lt;a href="#" class="get-a-quote" id="get-a-quote" onClick="toggleDraw('get-a-quote')" &gt;
  </code></pre>