单选按钮的更改

Below function is written using javascript and jquery.

function createRadioOptions(result, id, name) { 
     ;
    for (i = 0; i < result.length; i++) {
        var splitValue = splitString(result[i], ":");
            $("#"+id)     
            .append(
                $('<input />', { 
                    type: 'radio', 
                    name: name+'radioOptions', 
                    id: name+'radioOptions' + (i+1),
                    value: splitValue[0],
                    title: splitValue[1]
                 } )
            )
            .append(
                splitValue[1]                            
                )
            ;

    }
}

Above function is called to create radio buttons dynamically, when i select the radio button i have to call the below function.Please suggest.

function showSelected(index, id,name)
{

    var radioOptions = document.getElementById(name);

    if (radioOptions == null) //make an ajax call only for the first time the user clicks on the application name hyperlink
    {
        getRadioData(index, id, name);
    }

    var app = "#app"+index;
    var pop = ".pop"+aindex;

    $(app).live('click', function() {
        if($(this).hasClass("selected")) {
            deselect(index, name);  
        } else {
            $(this).addClass("selected");
            $(pop).slideFadeToggle(function() { 
            });
        }
        return false;
    });
}

It would be helpful to see your HTML.

But it sounds like you want to bind an onClick event to any dynamically created radio buttons you might create?

If that's the case, you're looking for JQuery().on() http://api.jquery.com/on/

$("#StaticParentElement").on("change",".DynamicRadioButtonElement", methodToBeFired(eventData));

This way, any new radio buttons added will automatically have your desired method attached to their change event. And you can get to the radio button that fired the event through the event data that was passed to it.