473,699 Members | 2,892 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

onmouseover change css class

133 New Member

What i want to do is when i mouseover an image it changes the class of a div that is somewhere on the page.

I thought i could do this by doing:

<div class="header_i mage2" name="remote" id="remote">
<div id="header_imag e2_inner">
<img src="images/composite-decking-sm.JPG" height="75" hspace="2" border="0" onmouseover="re mote.className = 'composite1';" onmouseout="rem ote.className = 'header_image2' ;"/>

But this does not work, any ideas?

Aug 26 '08 #1
1 1895
5,390 Recognized Expert Moderator Expert

Expand|Select|Wrap|Line Numbers
  1. onmouseover="document.getElementById('remote').className = 'composite1';"
kind regards
Aug 26 '08 #2

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

Similar topics

by: Richard | last post by:
I know I can have like <a href="#" onclick="dothis" onmouseover="dothat"> But how do you properly code two mouseover's in one statement? <a href="#" onmousever="dothis" onmouseover="dothat"> As an example of use: Column A holds menu items. When a mouse over is performed, two actions take place instead of one. Action one sends an image to a division in column B, action two sends text to another division in column B.
by: Epetruk | last post by:
Hi all, I want a page where the contents of a table cell are replaced with an image when the mouse moves over the cell, and the text is restored when the mouse moves out. Here's the html for the page: <HTML> <HEAD> <style type="text/css">
by: Martin Chen | last post by:
I have a frame set (as per MS FrontPage 2000). It has a contents and a main frame. The contents frame has a menu bar written with with javascript (in the context of a table). In IE6.1 everything works fine as it also does in firefox if I call the contents frame directly (i.e. outside of its frameset). However, if I call my main page (index.html) which invokes the frame set, the contents frame javascript menubar onmouseover function...
by: drjackk | last post by:
Hello, I'm trying to change the onmouseover event dynamically. This sets-up the initial onmouseover event: <a href="home.html"> <img border="0" id="img22" src="images/home1.jpg" height="15" width="85" alt="Home" onmouseover="FP_swapImg(1,0,/*id*/'img22',/*url*/'images/home2.jpg')"</a>
by: Rob Roberts | last post by:
I'm using .NET 2.0 and C# on a web site, and I'm trying to use the onmouseover and onmouseout events to do a rollover effect on an asp.net button. I've tried manually adding the events to the asp:button tag. The events I added look like this: onmouseover="this.className='btnNormal'" onmouseout="this.className='btnOver'" This works fine, with the rollover appearing as it should. But when I build the project in VS2005, I get a...
by: MrCode2k | last post by:
Hello, Trying to do: I just want a table that I can scroll and that has fixed headers. Problem: I got it to work but when I added the onmouseover event it didn't work anymore. Replicate-Problem: Scrolldown the textbox and put the mouse over a row.
by: MrCode2k | last post by:
Hello, Trying to do: I just want a table that I can scroll and that has fixed headers. Problem: I got it to work but when I added the onmouseover event it didn't work anymore. Replicate-Problem: Scrolldown the textbox and put the mouse over a row.
by: Justin Rowe | last post by:
I'm attempting to design a site with alot of dynamic content and intractability, however I've hit a snag when it comes to the function of the onMouseOver and onMouseOut events. Using a bit of code from QuirksMode to grab the location of the mouse, I've built a tooltip function to show a tooltip to the user depicting the target of a link, the problem is when you mouse over the box that the tooltip function is attatched to the tooltip...
by: Vear | last post by:
Hi, I'm looking to change the cssclass on a hyperlink with the onmouseover. I've tried the 3 syntax's below but to no success. Can someone point me in the right direction. Thanks HyperLink1.Attributes.Add("onmouseover", "this.ClassName='hover'") HyperLink1.Attributes.Add("onmouseover", "this.CssClass='hover'") HyperLink1.Attributes.Add("onmouseover", "this.Class='hover'")
by: =?Utf-8?B?RGVlcGE=?= | last post by:
Hi All, I have a webform in asp.net framework 1.1 where the dropdownlist is populated with list of locations from the database. The depending on the list selected, the user will be able to see functions associated for that location. Ex: Location: Charleston Functions: Add, Delete, Cancel, Edit Location: Los Angeles
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: 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();...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.