473,395 Members | 1,466 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,395 software developers and data experts.

on off radio buttons

Hi

Need some help creating a on/off radio style button, doesnt have to be a radio button, as you will find out as you read.

I have two telephone lines coming into our computer room, for each company. I need to create an on screen show which line we are on. See code below.

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <body>
  3.  
  4. <table border="1">
  5. <tr>
  6. <th> </th>
  7. <th>Comp 1</th>
  8. <th>Comp 2</th>
  9. </tr>
  10.  
  11. <tr>
  12. <td> Main </td>
  13. <td><input type="radio" name="ext1" value="Man_ext1" /> </td>
  14. <td><input type="radio" name="ext2" value="Man_ext2" /> </td>
  15. </tr>
  16. <tr>
  17.  
  18. <td> Reserve </td>
  19. <td><input type="radio" name="ext1" value="Res_ext1" /> </td>
  20. <td><input type="radio" name="ext2" value="Res_ext2" /> </td>
  21. </tr>
  22. </table>
  23.  
  24.  
  25. </body>
  26. </html>
As you will see its basic. Main feed should be in green, by default and reserve should be in grey. When I click Main it turns Main to Green and makes Reserve Grey. If I click Reserve it turns Main to grey and makes Reserve Red. Main and reserve can not be on at the same time, so must switch when click one or the other. I thought maybe I can use a gif to fill the table space, as I cant size the radio button to make it big enough to show which is on or off at a quick glance.

Im trying to avoid making it too compilcated and keep it within HTML/CSS.

Any help would be gratefully received.

Thanks
Jul 17 '11 #1
1 2542
Dormilich
8,658 Expert Mod 8TB
to keep it with CSS you would need the :checked pseudo-class of CSS3, but I doubt that IE supports it.
Jul 17 '11 #2

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

Similar topics

1
by: sman | last post by:
Hi, I recently read this article on About.com on how to create required fields for a form: http://javascript.about.com/library/scripts/blformvalidate.htm Everything works great except that there...
2
by: Jeff | last post by:
I'm trying to create a dynamic form that can have multiple groups of radio buttons (each group has two buttons) with the same name. Essentially, the form allows a user to enter as many names as...
4
by: Oscar Monteiro | last post by:
I Have to sets of Radio buttons like so: <input type="radio" name=p1 value=1> <input type="radio" name=p1 value=2> <input type="radio" name=p1 value=3> <br> <input type="radio" name=p2 value=1>...
2
by: Rob | last post by:
Hi all, I've got multiple sets of radio button that are dynamically created in code and populated by a database query. The query returns about 20 recordsets with 3 radio buttons per recordset and...
3
by: Ken Varn | last post by:
This is probably a simple question, but I am new to this so bear with me. I have a ASP.NET form that has a checkbox and a 2 radio buttons. When the checkbox is checked, the 2 radio buttons are...
2
by: James P. | last post by:
Help, I need to display radio buttons on a form. The data is from SQL table: each row in each table is displayed as a radio button. I have multiple SQL tables so I understand I need to put...
2
by: dpazza | last post by:
Hi, I'm creating a quiz on using a form in VB 2005 express. I have four sets of questions and answers (labels and radio buttons) and I change between which set of questions is currently shown on...
4
by: Blasting Cap | last post by:
I have a page that has a number of radio buttons that will be displayed to different access levels of a user who logs in to my website. For instance, if there are a dozen buttons, user1 will see...
11
by: Twayne | last post by:
Hi, Newbie to PHP here, no C or other relevant background, so pretty niave w/r to the nuances etc. but I think this is pretty basic. XP Pro, SP2+, PHP 4.4.7, XAMPP Local Apache Server...
7
by: gengyue | last post by:
Hi, I am running a report using Cold Fusion. This report is generated by cfloop tag. Depends on the record count of a query, the report will list the data retrieved from the database. each row in...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.