473,569 Members | 2,383 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Att ributes.Add("on mouseover", "this.src='some Image.jpg'");

Eirik Eldorsen
Nov 18 '05 #1
2 4425
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.nett sider.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.At tributes.Add("o nmouseover", "this.src='some Image.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.EventArg s) _
Handles MyBase.Load
ImageButton1.At tributes.Add _
("onmouseove r", "this.style.bor derColor='Red'; " & _
"this.src='http ://www.gc.ca/images/englishbt.gif'" )
End Sub

<asp:ImageButto n id="ImageButton 1" runat="server"
ImageUrl="http://www.gc.ca/images/francaisbt.gif"
BorderColor="Gr een" BorderWidth="3p x"></asp:ImageButton >

Ken
"Eirik Eldorsen" <NO************ @eldorsens.nett sider.no> wrote in message
news:eM******** *****@TK2MSFTNG P12.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.Att ributes.Add("on mouseover", "this.src='some Image.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
2286
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. What I want to do now is setup some kind of javascript event so that when the user mouse's over a row the row changes colour to highlight it. I've...
24
3473
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 frames have been loaded by using a javascript statement from the "navigation" frame, as shown below: top.window.ccs_logo.src =...
14
2327
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 conversation once.. and now I have been tasked with building a big website with LOTS of fancy javascripting. Image rollovers mostly. Only problem is that I...
3
1431
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 buttons to my own web page.... It works, but when I run the page IE 6 gives me the active content warning. 'Internet Explorer has restricted this...
7
1877
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
1641
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 Pic1.jpg, if they move their mouse to Thumbnail 2 area, the center area should show Pic2.jpg and so on. If there is a click in any area, then the picture...
1
22454
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 to change the color to something a little more appealing. I've tried overriding OnPaint, like this: public partial class MyControl : UserControl...
8
28517
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
3004
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 length. <html> <head> <title>Rapid Blocking Interface</title> <style> .calendar {
0
7703
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, 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...
0
7926
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. ...
0
8132
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...
1
7678
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...
0
5222
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...
0
3656
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...
1
2116
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
1
1226
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
944
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...

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.