Skip to main content

How to Validate Radio Button using Java Script

Use Following code to Validate radio button on your form:

function checkRadio (frmName, rbGroupName) {
var radios = document[frmName].elements[rbGroupName];
for (var i=0; i
if (radios[i].checked) {
return true;
}
}
return false;
}
To call this function for validation use the following code:-
------------------
if (!checkRadio("frm1","rdbgender"))
alert("You didnt select any fruits");
else
alert("You selected a fruit"); 


Say Namasthey to Javascript!!!. Post your comments..

Comments

Popular posts from this blog

Download YouTube Videos

Youtube converters are now taking attention of Internet users...Earlier it was very difficult to convert or download a youtube file to our disk. But now, you can download a file in formats like AVI, MPG, MP4, WMV,3gp(Mobile). You can convert either by using online application(such as youtubeconverter ) or by downloading an application software. You can use free softwares like YoutubeConverter that supports fast conversion. Some online applications supports mp3 formats as well. Try now....and feel the freedom!!!

How To Create A Wiki

A wiki is an open platform for sharing..It is not only just a website but also a collection of web pages that can be edited and reviewed by others..Check out this Presentation to know how to create a wiki using pbwiki: How To Create A Wiki View more presentations from Susan Bentley .

IPAD and Other Mobile Device Emulators

At present, Each Mobile device has got its own emulators. Some useful IPAD emulators that help application developers to build device specific applications: A List is given below: AIR IPAD Pre requisite : Adobe AIR Remark:  Working smoothly.. Some minor problems have been discovered like low browsing speed, screen flickering etc. JQuery mobile plugin is not working It is still in its ALFA stage Link : http://bit.ly/dtFX1S To test your web app just copy it on to the Application root folder. iOS SDK Current Version : 4 http://developer.apple.com/ipad/sdk/ iOS SDK comes with builtin emulators, this helps developers to test their application before implementation ONLINE EMULATORS Some useful online emulators IPAD Peek:   http://ipadpeek.com/ http://www.ipad-emulator.com/ IPhone Tester:  http://iphonetester.com/ Opera Mini - Demo:  http://www.opera.com/mobile/demo/ T-Mobile Emulator:  http://tmobile.modeaondemand.com/htc/g1/ ...