jquery- how to obtain the text shown on screen in a radio button/check box/list/drop down
<p>I am working to parse a form and obtain the values of all elements, including the text boxes, radio buttons, check boxes, list boxes and drop down boxes.</p>

<p>I am currently able to obtain the values for all of the above... By values I mean the value as assigned to that element (eg radio button)... However in some cases the text shown on screen for a value (in a radio/check box/drop down/list) is different from the text actually assigned  to that value (when the form is submitted).</p>

<p>For your reference, I am using code similar to the following for obtaining all the 'options' of a list/drop down text box-</p>

<pre><code>  if($(this).is('select'))
         {
            $(this).find('option').each(function(){ 
               alert( " Option value=" + $(this).val() );    
            });            
         }
</code></pre>

<p>For check box/radio button I am using val() which obtains all the assigned values.</p>

<p>Code that does this is given below--</p>

<pre><code> textmsg= textmsg + "...Also, for this element, the value is " + $(this).val() + " and type =" +  $(this).attr('type');
alert (textmsg);
</code></pre>

<p>How do I obtain the text value shown on screen (for radio buttons/check boxes/lists /drop down boxes)??</p>
