473,657 Members | 2,521 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to change checkbox and radio button color change

1 New Member
dear friends

any one can guide me or help, How i can change checkbox and radio button color change with java script

regards
devang
Mar 28 '08 #1
2 12395
vee10
141 New Member
Hi ,
To change color of any element u can use the style property
document.getEle mentById("contr olid").style.ba ckgroundColor = "RED";
to set background color like that u can change any color or any style (like font size ,font name etc)






dear friends

any one can guide me or help, How i can change checkbox and radio button color change with java script

regards
devang
Mar 28 '08 #2
hsriat
1,654 Recognized Expert Top Contributor
dear friends

any one can guide me or help, How i can change checkbox and radio button color change with java script

regards
devang
You can't change color of a radio button or checkbox.
IE (and I guess Opera) offers that by using style object (as vee10 said), but that doesn't come under W3C Standard.

So one should write that code which is valid according to W3C standards, unless you have to make it for IE only.

Regards,
Harpreet
Mar 28 '08 #3

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

Similar topics

1
6209
by: David Wake | last post by:
I have two radio buttons and two checkboxes in a form. I'm trying to write some code so that when a radio button is selected, its corresponding checkbox is disabled. My code looks like this: function radioClicked(index) { document.table_config_form.my_checkbox.disabled = true;
2
9195
by: /.. | last post by:
Hi all, I'm working on a report display page that currently uses 5 checkboxlists with a total of 86 items to display values from 5 different tables in an Access database. The page works fine now. On presenting it to the users they pointed out that their users could change the values in the checkboxes and then print them out, ultimately documenting false information.
4
2420
by: tshad | last post by:
Is there a to change just one radio button in a list just after DataBinding but before send the page to the user? For example: RFPServiceTypes.DataSource = myDbObject.RunProcedure("GetRFPServiceTypes", parameters) RFPServiceTypes.DataTextField = "Description" RFPServiceTypes.DataBind() RFPServiceTypes.Items.Insert(0, "All Services")
3
4433
by: newjazzharmony | last post by:
Hello group, I want to automatically select a specific checkbox when a user clicks (selects) a specific item in a radiobutton group. Both controls are in the same form. Let's say for argument's sake that the form looks like this (inessential items left out for the sake of clarity): <form name=form1>
4
16976
by: RC | last post by:
By default the radio button is a hollow circle for unchecked and filled black circle for checked similar for the check box button is a hollow square for unchecked and check symbol for checked.
2
3485
by: Advo | last post by:
Basically, ive got information in a table for the layout purposes, as its text for a questionnaire What i Need, is for instance when the user click a radio button, that information can be hidden. I tried <div id="myarea" style="visibility:hidden"><STRONG><font color="#4475AA"Question 2:</font></STRONG></divetc
10
3578
by: apparker | last post by:
I'm creating a new GUI for a program and it is for a medical exam. There are so many different things to ask someone during a history it wastes too much space to make checkboxes for everything so I had an idea: Can I simply create a list of conditions and when the doctor clicks them, they turn red? And clicking them again would make them default again? This would really make the exam better since the doctor could quickly glance at a...
2
2810
by: runway27 | last post by:
i am using a self submitting form <form action="<?php echo $_SERVER; ?>" method="POST" id="test2" name="test1"> i need to do a validation of textfields, checkboxes, radio buttons i am able to read, display and validate textfields after the form has been submitted however i am getting an error for checkbox and radio buttons.
3
2784
by: camdev | last post by:
I have a form with 2 radio buttons and multiple checkboxes (see example below). The one radio button indicates all and the other radio button indicates the user has chosen specific options (checkboxes) from a list. Can I use javascript to automatically select the 2nd radio button if the users clicks on any of the checkboxes? <form name=form1> <input type=radio name=Radio1 value=All> <input type=radio name=Radio1 value=Specific> <input...
3
1948
by: chiku1523 | last post by:
Hi, Please find the following code. In function setAnswers, I am looping with each question. I have inner loop, which is looping for each answers of the questions. If any of the answer for question 1 and question2 is selected this code is working fine. But if None of answer of either question selected, it is not iterating through outer loop. Please help me to point out the error. <html> <head> <style type="text/css"> body...
0
8823
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8726
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7320
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4151
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1604
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.