Populating form with data from jQuery-UI dialog.

Populating form with data from jQuery-UI dialog.

Hi,

I have a jQuery-UI dialog that gets populated via ajax to implement an LOV. The dialog gets populated well with radio buttons for each data row. Now I want the user to be able to select a radio button and click on a button to populate a form with the selected row data. My dialog uses an overlay. Here is the code:
  1. // handle the submision after selecting LOV row
        $(".get").live("click", function() {
            // the selected radio button
            var radio = $dialog.find("input[type='radio']:checked");
            // the text of the selected radio's tr
            var values = radio.closest("tr").text();
            // the user form to populate
            var $userform = $("#userform");
            $userform.find("input").each(function() {
                $(this).text(values);
            });
            $dialog.dialog('close');
        });











The problem is that when the '.get' button is clicked, the form field values are only visible in Firebug and not on the actual page. I need help with this. I tried using $(this).val(values) but it doesn't work either, in fact $(this).val(values) doesn't add anything not even in Firebug.