How do I focus on a javascript radio button or any other items on specific jquery tabs?
<p>I have javascript validation that validates items such as textboxes, radio buttons etc. How do I use focus() on the text box or other item located in a specific tab governed by  tags? </p>

<p>Sample of the javascript code:</p>

<pre><code>if (theForm.radbtnProg.checked &amp;&amp; theForm.ddlProg.selectedIndex == 0) {
    alert("Please select Institution Name from the list.");
    theForm.ddlProg.focus();
}
</code></pre>

<p>Above example theForm.radbtnProg.checked and theForm.ddlProg.selectedIndex are the radio button and drop down list that I want to validate. How do I refer to them according to specific tabs? </p>

<pre><code>$('#tabs').tabs(theForm.radbtnProg.checked)?
</code></pre>

<p><strong>Edited:</strong>
Answered by @nnnnnn and I modified the code:</p>

<pre><code>if (theForm.radProg.checked &amp;&amp; theForm.ddlProg.selectedIndex == 0) {
    alert("Please select Program Name from the list.");
    $('#tabs').tabs("select", 0);
    $("#ddlProg").focus();
    return false;
}
</code></pre>
