Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi All,

When i am selecting a value in radio button i am able to get the new value, but ui is not refresh with new value. in ui all radio button are unchecked and the focus is in the radio button with new value. please help me.
Posted
Comments
Thanks7872 23-Aug-13 2:32am    
Not at all clear. We can not understand what you have done,just by the line UI IS NOT REFRESH. What is there in ui. What you wanted to be refresh? What do you mean by refresh?
Hemant Singh Rautela 23-Aug-13 2:37am    
Use radiobutton property Autopostback to true...

1 solution

Your question is not clear,but i have made an attempt to answer in my own way.Suppose your markup goes like

XML
<div><input type="radio" id="ExtraRoom" name="roomType" value="Extra Room"/>Extra Room</div>
<input type="radio" id="PickUpToAirPort" name="roomType" value="Pick up to airport"/>Pick up to airport
<div id="SelectedRadio"></div>


JQuery Code to update UI on selection of particular radio button will be

JavaScript
$(document).ready(function(){
     $('input[type="radio"]').click(function() {
    $("#SelectedRadio").text($(this).val());
});
});
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900