title: How to select a row element value from Oracle APEX 4 Classic Report (row element from a table tags)
body: <p>Here is the challenge.. </p>
  
  <p>I have a classic report based on SQL on Region 1 in Oracle APEX 4</p>
  
  <p>The report (Report1) is structured like</p>
  
  <pre><code>    DATE_COL(this column will be hidden) or even the whole region can be hidden)
  Row1    12-01-2001
  Row2    11-01-2001
  Row3    10-01-2001
  </code></pre>
  
  <p>I want to select the value of DATE_COL of Row1 which is Date1 and assigned that to a label of an ITEM which can be on the same page or another page..</p>
  
  <p>The ITEM say for example is P_ITEM whose name will be displayed as 12-01-2001 on the screen </p>
  
  <p>So, essentially I want to select a Row1 element of report of column DATE_COL and use that as label name</p>
  
  <p>Then I wan to select Row2 element of the DATE_COL which is DATE2 and assigned to the col1 label of another report on the same page which is Report2 and will look like this</p>
  
  <pre><code> &lt;a href = "www.google.com"&gt; 11-01-2001 &lt;/a&gt; (this name is coming from report 1 of DATE_COL of Row2 element) also it has link
  
  Row1   100
  Row2   200
  </code></pre>
  
  <p>Please guide me how to accomplish this one.</p>
  
  <p>The example html looks like this</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;body&gt;
  
  &lt;table id="report_R124146326020103259" cellspacing="1" cellpadding="0" border="1" summary=""&gt;
  &lt;tbody&gt;
  
  &lt;tr&gt;
  
  &lt;td&gt;
  
  &lt;table class="report-standard" cellspacing="1" cellpadding="2" border="0" summary=""&gt;
  
  &lt;tbody&gt;
  
  &lt;tr&gt;
   &lt;th id="DATE1" class="header" align="left"&gt;DATE1&lt;/th&gt;
   &lt;th id="DATE2" class="header" align="left"&gt;DATE2&lt;/th&gt;
   &lt;th id="DATE3" class="header" align="left"&gt;DATE3&lt;/th&gt;
   &lt;th id="DATE4" class="header" align="left"&gt;DATE4&lt;/th&gt;
   &lt;th id="DATE5" class="header" align="left"&gt;DATE5&lt;/th&gt;
  &lt;/tr&gt;
  
  &lt;tr class="highlight-row"&gt;
   &lt;td class="data" headers="DATE1"&gt;12-01-2001&lt;/td&gt;
   &lt;td class="data" headers="DATE2"&gt;11-01-2001&lt;/td&gt;
   &lt;td class="data" headers="DATE3"&gt;10-01-2001&lt;/td&gt;
   &lt;td class="data" headers="DATE4"&gt;09-01-2001&lt;/td&gt;
   &lt;td class="data" headers="DATE5"&gt;08-01-2001&lt;/td&gt;
  &lt;/tr&gt;
  
  &lt;tr class="highlight-row"&gt;
   &lt;td class="data" headers="DATE1"&gt;10-01-2001&lt;/td&gt;
   &lt;td class="data" headers="DATE2"&gt;09-01-2001&lt;/td&gt;
   &lt;td class="data" headers="DATE3"&gt;08-01-2001&lt;/td&gt;
   &lt;td class="data" headers="DATE4"&gt;12-01-2001&lt;/td&gt;
   &lt;td class="data" headers="DATE5"&gt;11-01-2001&lt;/td&gt;
  &lt;/tr&gt;
  
  &lt;/tbody&gt;
  
  &lt;/table&gt;
  
  &lt;/td&gt;
  
  &lt;/tr&gt;
  
  &lt;/tbody&gt;
  
  &lt;/table&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I guess JQuery can be used to accomplish, but not sure, how the selector need to use.</p>
  
  <p>Thanks,
  --CP</p>
  
  <p>EDIT 1</p>
  
  <p>I created following script based on Tom's Jquery selector which does selects the row element. However the following script which I ran in W3Schools html editor didn't select the row element, which I put in Test function. The test function which I am calling in "A tag" didn't produce any results. However the other function which is WelcomeMessage did produce the result. Can anybody help me identify the error?</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  
  &lt;head&gt;
  
      &lt;script type="text/javascript" src="jquery.js"&gt;&lt;/script&gt;
  
      &lt;script type="text/javascript"&gt; 
      function test(i) { 
         var ab = $("#report_DT tr:eq(i) td.data[headers='DATE1']").text();
         document.write(ab);
      }
  
      function welcomeMessage()
      {
        document.write("Welcome to Henley's Department Store!");
      }
      &lt;/script&gt;
  
      &lt;/head&gt;
  
  
      &lt;body&gt;
  
      &lt;table id="report_DT" cellspacing="1" cellpadding="0" border="1" summary=""&gt;
      &lt;tbody&gt;
  
      &lt;tr&gt;
  
      &lt;td&gt;
  
      &lt;table class="report-standard" cellspacing="1" cellpadding="2" border="0" summary=""&gt;
  
      &lt;tbody&gt;
  
      &lt;tr&gt;
       &lt;th id="DATE1" class="header" align="left"&gt;DATE1&lt;/th&gt;
       &lt;th id="DATE2" class="header" align="left"&gt;DATE2&lt;/th&gt;
       &lt;th id="DATE3" class="header" align="left"&gt;DATE3&lt;/th&gt;
       &lt;th id="DATE4" class="header" align="left"&gt;DATE4&lt;/th&gt;
       &lt;th id="DATE5" class="header" align="left"&gt;DATE5&lt;/th&gt;
      &lt;/tr&gt;
  
      &lt;tr class="highlight-row"&gt;
       &lt;td class="data" headers="DATE1"&gt;12-01-2001&lt;/td&gt;
       &lt;td class="data" headers="DATE2"&gt;11-01-2001&lt;/td&gt;
       &lt;td class="data" headers="DATE3"&gt;10-01-2001&lt;/td&gt;
       &lt;td class="data" headers="DATE4"&gt;09-01-2001&lt;/td&gt;
       &lt;td class="data" headers="DATE5"&gt;08-01-2001&lt;/td&gt;
      &lt;/tr&gt;
  
      &lt;tr class="highlight-row"&gt;
       &lt;td class="data" headers="DATE1"&gt;10-01-2001&lt;/td&gt;
       &lt;td class="data" headers="DATE2"&gt;09-01-2001&lt;/td&gt;
       &lt;td class="data" headers="DATE3"&gt;08-01-2001&lt;/td&gt;
       &lt;td class="data" headers="DATE4"&gt;12-01-2001&lt;/td&gt;
       &lt;td class="data" headers="DATE5"&gt;11-01-2001&lt;/td&gt;
      &lt;/tr&gt;
  
      &lt;/tbody&gt;
  
      &lt;/table&gt;
  
      &lt;/td&gt;
  
      &lt;/tr&gt;
  
      &lt;/tbody&gt;
  
      &lt;/table&gt;
  
      &lt;a href ="default.asp"&gt;  
  
      &lt;div&gt; &lt;Script Language="JavaScript"&gt;
                           test(i);
                        &lt;/Script&gt;
                   &lt;/div&gt;
  
  
      &lt;/a&gt;
  
  
      &lt;a href ="default.asp"&gt;  
  
      &lt;div&gt; &lt;Script Language="JavaScript"&gt;
                           welcomeMessage();
                        &lt;/Script&gt;
                   &lt;/div&gt;
  
  
      &lt;/a&gt;
      &lt;/body&gt;
      &lt;/html&gt;
  </code></pre>
  
  <p>Can anybody spot the error why test function is not retrieving the desired result?</p>