get active tab name into a hidden field at runtime
<p>I have aspx page with tabs like below...</p>

<pre><code> &lt;ul class="tabs-menu" style="list-style-type: none;" &gt;
        &lt;li class="active"&gt;&lt;a class="anchor" href="#ATab" style="text-decoration: none;" &gt; A&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a class="anchor" href="#BTab" style="text-decoration: none;"&gt;B&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a class="anchor" href="#CTab" style="text-decoration:none;"&gt;C&lt;/a&gt;&lt;/li&gt;

    &lt;/ul&gt;
</code></pre>

<p>This is the hidden field that should store the active tab and pass it to a function when clicked on submit button on Modal popup</p>

<pre><code>&lt;input type="hidden" name="findTab" id="findTabname" value=""/&gt;
</code></pre>

<p>I am showing this ASPX page as Modal pop up from another page using Jquery like below </p>

<pre><code>$("#Test").live('click', function OpenSearchDialog() {
        $("#dialog_testsearch").load("Test.aspx", function() {
          $(this).dialog({
              autoOpen: true,
              modal: true,
              width: 750,
              buttons: {
                  Go: function() {
                      var current_tab = $("#anchor").tabs('option', 'selected');
                   //anchor is my class for the list items
         callTestFunction()

                  },
                  Close: function() {
                      $(this).dialog("close");
                  }
              }
          });
          $(this).siblings('.ui-dialog-titlebar').remove();
          $(this).container.css('height', 'auto');
      });
      return false;
  });
</code></pre>

<p>Now My question is how do I get the name of active name into that hidden field ? And then into this Jquery when clicked on Go button..
Because I wanted to execute functions based on tabs selected</p>

<pre><code> function callTestFunction()
   {
       if A
        //do this
       if B 
       //do this
       if c 
        //do this 
    }
</code></pre>

<p>I am really hitting my head to the wall to this simple thing. But I couldn't get it working</p>