473,396 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to alert user, if radio box and check box is not selected

1
If user do not click on any of these button, then how to alert to say select atleast 1 option for both the button(radio button & radio button)


Gender:
Expand|Select|Wrap|Line Numbers
  1.     <input type="radio" name="common" />Male
  2.     <input type="radio" name="common" />Female
Select your Hobbies:
Expand|Select|Wrap|Line Numbers
  1.     Swimming<input type="checkbox" name="check1" />
  2.     Playing<input type="checkbox" name="check2" />
  3.     Driving<input type="checkbox" name="check3" />
  4.     Riding<input type="checkbox" name="check4" />
Apr 26 '10 #1
1 1616
Dormilich
8,658 Expert Mod 8TB
you could either define a default value (via the checked attribute) or loop over each group showing the alert, if every .checked property is false.
Apr 26 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Nige | last post by:
Is it possible to create an alert box when a radio button is selected? I have a group of three, and I want a different alert for each one. -- Nige Please replace YYYY with the current year...
9
by: Bob Cummings | last post by:
Greetings I have googled this to no avail, maybe someone here can help. I have a user control that has several radio buttons and text boxes. I place 5 of these user controls on a windows form....
2
by: darrel | last post by:
I'm using some standard HTML radio buttons (to allow finer javascript interaction) on a web page and would like to catch the selected item on postback. Since they are all ID's uniquely, is there a...
3
by: Amelyan | last post by:
When we want radio button to belong to a group name we say, radio1.GroupName="GroupA". In this case, radio1 will be unselected if another radio button is selected in "GroupA". Is there a way...
10
by: Scuba Rob | last post by:
I am having problems on getting the radio button to work with my.settings correctly. I want the program to check to see which one was last saved to use at startup. The closest I have come is that I...
4
by: yawnmoth | last post by:
I'm trying to display a popup showing which radio button is selected and am unable to do so. Every time I try, I get undefined, instead of the value of the particular form variable I'm trying to...
1
by: kenny8787 | last post by:
Hi, can anyone help here? I have the following code generated from a database, I want to have javascript calculate the costs of the selected items using radio buttons, subtotal the costs and...
2
by: Gugale at Lincoln | last post by:
Hi, I am creating a user control which has a radio button and few other controls. I would like the user control to behave like a radio button, in the sense when added to a container radio button...
4
by: Z.K. | last post by:
I started a forms application and I put on the form three buttons. In the functions for the radio buttons I put in a single messagebox like: MessageBox("Hello 1") MessageBox("Hello 2") ...
5
by: vjsv2007 | last post by:
Can you help to make one alert with all details? <script type="text/javascript"> <!-- function validate_form ( ) { valid = true;
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.