I have two multiple select inputs. Initially the first contains a bunch of
items and the second is empty. Using a common method, I move items back and
forth by double clicking on them.
This portion works perfectly, but I would also like to change the background
color of the select element with the current focus.
I have defined the following classes:
..selected {
background: #C0FFFF
}
..deselected {
background: #FFFFFF
}
Using the following function below I am able to shift the background color
of rows containing content, but the color of the empty rows remain the
"selected" color. How can this effect be achieved for all rows, whether they
contain content or not?
Thanks!
-----------------------------------------------------------
function changeBackgroun d(obj,theSelect ) {
for (var i=1; i<obj.length; i++) {
obj[i].className = 'deselected';
}
obj[theSelect].className = 'selected';
} 2 1846
Bosconian wrote: I have two multiple select inputs. Initially the first contains a bunch of items and the second is empty. Using a common method, I move items back and forth by double clicking on them.
This portion works perfectly, but I would also like to change the background color of the select element with the current focus.
I have defined the following classes:
.selected { background: #C0FFFF } .deselected { background: #FFFFFF } Using the following function below I am able to shift the background color of rows containing content, but the color of the empty rows remain the "selected" color. How can this effect be achieved for all rows, whether they contain content or not?
Thanks!
-----------------------------------------------------------
function changeBackgroun d(obj,theSelect ) { for (var i=1; i<obj.length; i++) { obj[i].className = 'deselected'; } obj[theSelect].className = 'selected'; }
Hi Bosconian,
I think you misposted. :-)
This is comp.lang.php
I think you want a HTML or JS newsgroup.
Regards,
Erwin Moller
"Bosconian" <bo*******@plan etx.com> wrote in message
news:gu******** ************@co mcast.com... I have two multiple select inputs. Initially the first contains a bunch of items and the second is empty. Using a common method, I move items back
and forth by double clicking on them.
This portion works perfectly, but I would also like to change the
background color of the select element with the current focus.
I have defined the following classes:
.selected { background: #C0FFFF } .deselected { background: #FFFFFF } Using the following function below I am able to shift the background color of rows containing content, but the color of the empty rows remain the "selected" color. How can this effect be achieved for all rows, whether
they contain content or not?
Thanks!
-----------------------------------------------------------
function changeBackgroun d(obj,theSelect ) { for (var i=1; i<obj.length; i++) { obj[i].className = 'deselected'; } obj[theSelect].className = 'selected'; }
Disregard--wrong group. Doh! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Holden Caulfield |
last post by:
Hi there,
for IE 5+ I need to be able to change certain TD tags´ background
colors, and can´t figure out how to do it...
For instance, in a table with 25 cells, somewhere between 5 or 10 will
need the bgcolor to change at the same time when a user clicks a
button. Right now only one changes when I use something like this...
document.getElementById(´cellchange´).style.backgroundColor = "FFFFFF"
** (Note, this is not the EXACT code, I...
|
by: david.graham18 |
last post by:
Hi
I spotted some nice code to change the background colour of a web page to
one of four different colours at random but I can't find it now!
The method was to select a number at random from 1 to 4 by using the rnd()
function and then dividing by modulus 4. The result was then used to select
a cell in a 4 cell array which was holding a different colour in each cell
of the array. I would like to have this code but lack the knowledge to...
|
by: Stephen Cook |
last post by:
Having worked through the problems around enabling the document function
using an XmlUrlResolver I started work on building a useful class to hide
the intricacies.
Trying to generalise the process I've hit a snag.
How do I resolve multiple external references?
The transform method on a stylesheet only takes one resolver, not an array
Stephen
|
by: Tom |
last post by:
Hi
I have a ListBox control of my asp.net web page. I want to set the value of
the style property of the ListItem to a specific background color.
I have tried this but no success:
//li is the ListItem object
li.Attributes.CssStyle.Add("BACKGROUND-COLOR:","blue");
|
by: GaryDean |
last post by:
In the original post I failed so indicate that I am using framework
1.1.......
I need to be able to change the background color of a page from code. I
found an answer to this question in another forum from Peter Huang that said
that an id="bg" as follows...
<body MS_POSITIONING="GridLayout" runat="server" id="bg">
then we could do the following in our codebehind file....
| |
by: Glenn Hanna |
last post by:
Hi,
Can someone tell me how to change the background color of a web page though
C#? I've tried various things that I have found on the web written in VB
but I haven't had much luck with them.
Thank you,
Glenn
|
by: Bosconian |
last post by:
I have two multiple select inputs. Initially the first contains a bunch of
items and the second is empty. Using a common method, I move items back and
forth by double clicking on them.
This portion works perfectly, but I would also like to change the background
color of the select element with the current focus.
I have defined the following classes:
..selected {
|
by: amykimber |
last post by:
Hi all,
I know I'm doign something really daft, but I can't get this to
work...
I have a form with a bunch of inputs called ship_owner - why the
? Because I'm submitting this page though php and the put the data
into an array in the post.... anywhat.
I have a link <a href="javascript:change_class()" >Block mode</a> to
|
by: 32Alpha |
last post by:
Hi, first post here.
First off, this IS a homework assignment for an operating systems class, but the question isn't "how do i do the assignment" but "why is my particular implementation not working".
I've searched the forums here, but could not find anything particular to my problem, Googling and the linux manual pages haven't been much help either.
What the program is supposed to do is create a very simple shell (that sits atop the...
|
by: jeddiki |
last post by:
I want to change the default background color of my select box.
Here is the problem:
Link to form with color select
Notice in the color selector, the background color that I have given it
it the option statement changes on hover to a blue/gray.
Instead of background color change I would like the text to BOLD.
So on hovering over green, the text "green" goes green (bold) but
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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...
|
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...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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...
|
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...
| |
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
|
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...
| |