+Jay Shah Thanks a lot for your feedback. This means a lot. I am pleased you found these videos useful. Dot Net & SQL Server video tutorials to help you become a web developer th-cam.com/users/kudvenkatplaylists?view=1&sort=dd DVDs for offline viewing www.pragimtech.com/Order.aspx Slides & Text Version of the videos can be found on my blog csharp-video-tutorials.blogspot.com Tips to effectively use my youtube channel th-cam.com/video/y780MwhY70s/w-d-xo.html To receive email alerts, when new videos are uploaded, please subscribe to my channel th-cam.com/users/kudvenkat If you like these videos, please click on the THUMBS UP button below the video May I ask you to please share the link with your friends and family who you think would also benefit from them Thank You Venkat
Awesome tuts !!! Actually I think that we can just write if(inputChecked.length) instead of if(inputChecked.length>0) because 0 is considered as false in javascript ^^
man, you're tutorials are the best on youtube. One question: why do you give the same name to all the checkboxes? Is this the reason why the jquery returns an array? Thank You.
If you click 'submit' button then page will refresh itself. So that div value will be empty in a second. If you don't want this happen use a function with "e" parameter then call it: e.preventDefault(); whole script will be: $(document).ready(function () { $('#btnSubmit').click(function (e) { e.preventDefault(); var result = $('input[type="radio"]:checked'); if (result.length > 0) { $('#divResult').html(result.val() + " is checked"); } else { $('#divResult').html("No radio is checked"); } }); });
Hi, there's a glitch, if i add form tag then the the value of the checked radio button assigned to the new element doesn't show up on the page, it just appears and goes away
sir please... can you tell me this code is only work with HTML input elements(checkbox or radio buttons) ? Actually i m try this code with ASP.NET checkboxs or radio so its only give a ON text or output screen .... PLEASE SIR GIVE A SOLUTION
So, above you have var result, it will return a group of results. When you do result.each you create a function that will work for each result in that group. So, if the group has 4 results it will do 4 iterations. (this) keyword is actually referring to result of current iteration. So, resultString+=$(this).val() +""; actually means resultString = resultString + $(this).val() +""; So here, you are assigning the value of current iteration "$(this).val()" to resultString, and you are adding a break with "" so it would go to another row for the next iteration. For next iteration (this) keyword will now refer to result of that iteration and it will repeat the whole process. I hope that i was clear with my explanation :)
Just Love the tutorials !!! They are too good !!!!
+Jay Shah Thanks a lot for your feedback. This means a lot. I am pleased you found these videos useful.
Dot Net & SQL Server video tutorials to help you become a web developer
th-cam.com/users/kudvenkatplaylists?view=1&sort=dd
DVDs for offline viewing
www.pragimtech.com/Order.aspx
Slides & Text Version of the videos can be found on my blog
csharp-video-tutorials.blogspot.com
Tips to effectively use my youtube channel
th-cam.com/video/y780MwhY70s/w-d-xo.html
To receive email alerts, when new videos are uploaded, please subscribe to my channel
th-cam.com/users/kudvenkat
If you like these videos, please click on the THUMBS UP button below the video
May I ask you to please share the link with your friends and family who you think would also benefit from them
Thank You
Venkat
Sir your tutorials are best in class.They reflect the amount of hard work you have put in making these tutorials.MAY GOD BLESS YOU
GREAT EXPLANATION ..I HAVE EVER SEEN IN TH-cam TUTORIAL VIDEOS...GREAT WORK...
Absolutely love all the tutorials
Awesome tuts !!!
Actually I think that we can just write if(inputChecked.length) instead of if(inputChecked.length>0) because 0 is considered as false in javascript ^^
Thank you very much for this tutorial.
GOD bless you and keep you in THE NAME of LORD JESUS CHRIST. Amen.
Okay. I will share this video. Thank you for the links :).
man, you're tutorials are the best on youtube. One question: why do you give the same name to all the checkboxes? Is this the reason why the jquery returns an array? Thank You.
Same name groups radio buttons so when you check one, any other checked ones from same group will not be checked..
Nice tutorial , can you suggest me to find out how to prevent being checked remaining radio button after first time checked.
Thank you very much for this tutorial.
Thank you for the tutorials.
Really very good tutorial
If you click 'submit' button then page will refresh itself. So that div value will be empty in a second. If you don't want this happen use a function with "e" parameter then call it: e.preventDefault();
whole script will be:
$(document).ready(function () {
$('#btnSubmit').click(function (e) {
e.preventDefault();
var result = $('input[type="radio"]:checked');
if (result.length > 0) {
$('#divResult').html(result.val() + " is checked");
} else {
$('#divResult').html("No radio is checked");
}
});
});
thanks a lot . It was a very helpful video
Thanks for this tutorial
very helpful tutorial
1. How can i remove checked checkboxes counter??
2. How can i add single value in different html div element with class & span as child element of it.
awesome concepts
Debasmita Swain hi
Debasmita Swain ۔ ۔ ۔ ۔ ۔ ۔ ۔ ۔ ۔ ۔ ۔ ۔ ۔ ۔ ۔ ۔ ۔ ۔ ۔ ۔ ۔ ۔ ۔ ۔ Hi
why in my case it works only during click event & in your case it saves result in html after click?
5:47 - 3 checkboxes checked .length .each += .val
thank u sir..
Thank you sir
Hi, there's a glitch, if i add form tag then the the value of the checked radio button assigned to the new element doesn't show up on the page, it just appears and goes away
what is the input type if we take asp:RadioButtons
Cool
sir please... can you tell me this code is only work with HTML input elements(checkbox or radio buttons) ? Actually i m try this code with ASP.NET checkboxs or radio so its only give a ON text or output screen .... PLEASE SIR GIVE A SOLUTION
i write same program with different variable name, its is returning correct statement but disappear in a second. what to do?
Just change the button type attribute to button
good
how to bind checked selector in database
how to apply jquery to this
sir don't you have javascript tutorial in php
how to mark checkbox by default ,pls help me out
just write "checked" without double quotes inside radio button you want as default checked.
resultString+=$(this).val() +""; Plz explain this statment
So, above you have var result, it will return a group of results. When you do
result.each
you create a function that will work for each result in that group. So, if the group has 4 results it will do 4 iterations. (this) keyword is actually referring to result of current iteration. So,
resultString+=$(this).val() +""; actually means
resultString = resultString + $(this).val() +""; So here, you are assigning the value of current iteration "$(this).val()" to resultString, and you are adding a break with "" so it would go to another row for the next iteration.
For next iteration (this) keyword will now refer to result of that iteration and it will repeat the whole process. I hope that i was clear with my explanation :)
@@1986nesha no i am not