Click here to Skip to main content
15,888,521 members
Home / Discussions / Web Development
   

Web Development

 
QuestionRadio button default checked Pin
astrixtech28-Jun-13 3:33
astrixtech28-Jun-13 3:33 
QuestionRe: Radio button default checked Pin
astrixtech30-Jun-13 19:29
astrixtech30-Jun-13 19:29 
AnswerRe: Radio button default checked Pin
thanh_bkhn30-Jun-13 20:37
professionalthanh_bkhn30-Jun-13 20:37 
QuestionRe: Radio button default checked Pin
astrixtech30-Jun-13 21:12
astrixtech30-Jun-13 21:12 
AnswerRe: Radio button default checked Pin
thanh_bkhn30-Jun-13 21:25
professionalthanh_bkhn30-Jun-13 21:25 
GeneralRe: Radio button default checked Pin
astrixtech30-Jun-13 21:40
astrixtech30-Jun-13 21:40 
GeneralRe: Radio button default checked Pin
thanh_bkhn30-Jun-13 21:55
professionalthanh_bkhn30-Jun-13 21:55 
GeneralRe: Radio button default checked Pin
astrixtech30-Jun-13 23:00
astrixtech30-Jun-13 23:00 
Okay I thought the code started to work a bit cos of runat attribute. Thanks for the info. Smile | :)
Please find below the code.
$(document).ready(function() {
var chbx = $(".s4-itm-cbx");
var element = chbx.replaceWith('<input type="radio" runat="server" name="rdList" style="width:12px; height:12px;"  value="'+checkbox.attr('value')+'"/>');
//document.getElementById("#rdList").checked = true;
//$("#rdList").checked = true;
//$(this).trigger('click');
//$('input:radio[name=rdList]')['0'].checked = true;
$('input:radio[name=rdList]:nth(0)').attr('checked',true);
$("input:radio[name=rdList]:checked").trigger('click');


$("input[type='radio']").click(function(){
var crbx = document.activeElement;
$("input[type='radio']").each(function () {
if(this!= crbx && this.checked == true){
this.checked = false;
$(this).trigger('click');
}
});
});
});

Couple of other information:
I am creating a Sharepoint list,where checkboxes are allowed. The requirement is ,the user should be able to select only one listitem at a time.Thats why I am changing the checkboxes to radio button. Again, the first list item should be selected by default.Hope, this information is sufficient.
QuestionRegarding Wordpress Solution Pin
David Kroj26-Jun-13 22:57
David Kroj26-Jun-13 22:57 
GeneralHelp for a new and intersted to know about HTML Pin
BLue.iCe.BoX26-Jun-13 22:41
BLue.iCe.BoX26-Jun-13 22:41 
GeneralRe: Help for a new and intersted to know about HTML Pin
jaideepsinh27-Jun-13 0:45
jaideepsinh27-Jun-13 0:45 
GeneralRe: Help for a new and intersted to know about HTML Pin
BLue.iCe.BoX27-Jun-13 17:19
BLue.iCe.BoX27-Jun-13 17:19 
QuestionBreadcrump Pin
astrixtech26-Jun-13 20:28
astrixtech26-Jun-13 20:28 
QuestionRe: Breadcrump Pin
astrixtech30-Jun-13 19:30
astrixtech30-Jun-13 19:30 
QuestionCSS-Sprites question Pin
vkEE26-Jun-13 5:06
vkEE26-Jun-13 5:06 
QuestionHighlight a button on mouse hover Pin
astrixtech26-Jun-13 2:53
astrixtech26-Jun-13 2:53 
AnswerRe: Highlight a button on mouse hover Pin
Graham Breach26-Jun-13 3:32
Graham Breach26-Jun-13 3:32 
AnswerRe: Highlight a button on mouse hover Pin
Blikkies26-Jun-13 3:34
professionalBlikkies26-Jun-13 3:34 
GeneralRe: Highlight a button on mouse hover Pin
astrixtech26-Jun-13 20:13
astrixtech26-Jun-13 20:13 
GeneralRe: Highlight a button on mouse hover Pin
Blikkies26-Jun-13 20:57
professionalBlikkies26-Jun-13 20:57 
GeneralRe: Highlight a button on mouse hover Pin
astrixtech26-Jun-13 21:14
astrixtech26-Jun-13 21:14 
GeneralRe: Highlight a button on mouse hover Pin
Blikkies26-Jun-13 21:24
professionalBlikkies26-Jun-13 21:24 
GeneralRe: Highlight a button on mouse hover Pin
astrixtech27-Jun-13 2:15
astrixtech27-Jun-13 2:15 
GeneralRe: Highlight a button on mouse hover Pin
astrixtech27-Jun-13 2:38
astrixtech27-Jun-13 2:38 
GeneralRe: Highlight a button on mouse hover Pin
Blikkies27-Jun-13 2:53
professionalBlikkies27-Jun-13 2:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.