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

mouseover changing bordercolor

Is it possible to make the mouseover event of a ImageButton to change the
border color?

I use this code to change the src:
ImageButton.Attributes.Add("onmouseover", "this.src='someImage.jpg'");

Eirik Eldorsen
Nov 18 '05 #1
2 4416
use javascript an call a function like this:

function HighLight(obj)
{
var objs = document.all;
for (var i=0; i<objs.length; i++)
{
if (objs[i].className == 'hilite')
{
objs[i].className = 'nohilite';
}
}
obj.className = 'hilite';
}

On Thu, 8 Jul 2004 23:41:51 +0200, "Eirik Eldorsen" <NO************@eldorsens.nettsider.no> wrote:
Is it possible to make the mouseover event of a ImageButton to change the
border color?

I use this code to change the src:
ImageButton.Attributes.Add("onmouseover", "this.src='someImage.jpg'");

Eirik Eldorsen

Bobby Ryzhy
bobby@ name of domain below
http://www.weekendtech.net
Nov 18 '05 #2
Hi Eirik,

Same idea with a slightly different syntax:

Private Sub Page_Load _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load
ImageButton1.Attributes.Add _
("onmouseover", "this.style.borderColor='Red';" & _
"this.src='http://www.gc.ca/images/englishbt.gif'")
End Sub

<asp:ImageButton id="ImageButton1" runat="server"
ImageUrl="http://www.gc.ca/images/francaisbt.gif"
BorderColor="Green" BorderWidth="3px"></asp:ImageButton>

Ken
"Eirik Eldorsen" <NO************@eldorsens.nettsider.no> wrote in message
news:eM*************@TK2MSFTNGP12.phx.gbl...
Is it possible to make the mouseover event of a ImageButton to change the
border color?

I use this code to change the src:
ImageButton.Attributes.Add("onmouseover", "this.src='someImage.jpg'");

Eirik Eldorsen


Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Colin Steadman | last post by:
Help! I'm a stupid HTML bod and I dont do Javascript! I have a grey coloured table that displays certain columns in either red, green or orange to give meaning and emphasis to certain data. ...
24
by: Charles Crume | last post by:
Hello; My "index.htm" page has 3 frames (content, navigation bar, and logo). I set the "SRC" of the "logo" frame to a blank gif image and then want to change it's contents after the other two...
14
by: J. Makela | last post by:
Hallo. This should be a pretty entertaining question for you *real* javascript writers.. I, being the lowly photoshop guy at an ad agency made the mistake of actually saying "HTML" in a...
3
by: graeme_smith77 | last post by:
Hi all, very new to web design in general and Javacript in particular. I found.... http://www.peterkerr.freeserve.co.uk/mouseover/html.html and used the mouseover example to add some changing...
7
by: rkbnair | last post by:
Is it possible to change the background color of the DataGrid on pointing the mouse over a certain row?
3
by: Maxi | last post by:
All areas surrounded to the center area has files Thumbnail1.jpg......Thumbnail8.jpg. What I want to do is whenever user moves his/her mouse in Thumbnail 1 area, the center area should show...
1
by: David Veeneman | last post by:
Is there a simple way to change a UserControl border color? I'm creating a UserControl that will have a border, using the UserControl.BorderStyle property. The standard border is black; I'd like...
8
by: Steve | last post by:
Hi All Is there a way to change the colour of a Groupbox border in VB.net 2005 I want to change it to white Can it be done in the onpaint event? Regards Steve
2
by: markszlazak | last post by:
I'm a relatively slow response of table cells changing their background color with mouseover/our in IE6 (Win 2K) but the response is fine (fast) in Firefox. Why? The code is below. Sorry about the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: 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?
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,...

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.