473,586 Members | 2,546 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

onmouseover question

I know I can have like <a href="#" onclick="dothis " onmouseover="do that">
But how do you properly code two mouseover's in one statement?
<a href="#" onmousever="dot his" onmouseover="do that">

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.

What's the trick?

I am searching google for the answer as well.
Jul 23 '05 #1
7 2270
Richard wrote:
I know I can have like <a href="#" onclick="dothis " onmouseover="do that">
But how do you properly code two mouseover's in one statement?
<a href="#" onmousever="dot his" onmouseover="do that">


<a href="#" onmouseover="do This();doThat() ">
OR:
<a href="#" onmouseover="do Both()">

function doBoth(){
doThis();
doThat();
}

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq
Jul 23 '05 #2
On Fri, 7 Jan 2005 20:57:11 -0600 Richard wrote:
I know I can have like <a href="#" onclick="dothis "
onmouseover="do that">
But how do you properly code two mouseover's in one statement?
<a href="#" onmousever="dot his" onmouseover="do that"> 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. What's the trick? I am searching google for the answer as well.


Ok. Sort of found the solution I guess. Simple enough.

onmouseover="do this" ; "do that"
Now all I need to do is to figure out how to place the two actions in the
proper divisions.
Jul 23 '05 #3
Richard wrote:
[...]
onmouseover="do this" ; "do that"


Bzzzzt. "do that" will not be called.

As Randy posted:

onmouseover="do this(); dothat()"

--
Rob
Jul 23 '05 #4
On Fri, 07 Jan 2005 22:31:17 -0500 Randy Webb wrote:
Richard wrote:
I know I can have like <a href="#" onclick="dothis "
onmouseover="do that">
But how do you properly code two mouseover's in one statement?
<a href="#" onmousever="dot his" onmouseover="do that">
<a href="#" onmouseover="do This();doThat() "> <a href="#" onmouseover="do Both()"> function doBoth(){
doThis();
doThat();
}


Thanks Randy.
I figured it was purely in the syntax thing.

Jul 23 '05 #5
On Fri, 07 Jan 2005 22:31:17 -0500 Randy Webb wrote:
Richard wrote:
I know I can have like <a href="#" onclick="dothis "
onmouseover="do that">
But how do you properly code two mouseover's in one statement?
<a href="#" onmousever="dot his" onmouseover="do that">
<a href="#" onmouseover="do This();doThat() "> <a href="#" onmouseover="do Both()"> function doBoth(){
doThis();
doThat();
} --
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq

Would this work then?

onmouseover="ch angetext(conten t[1]);changetext(co ntent[2])"

But what I aiming at doing is, having the content in two seperate divisions
change at the same time.
So perhaps I could have:
onmouseover="ch angetext(conten t[1]);changeimage(c ontent[2])"

Jul 23 '05 #6
Richard wrote:
On Fri, 07 Jan 2005 22:31:17 -0500 Randy Webb wrote:

Richard wrote:
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="dot his" onmouseover="do that">

<a href="#" onmouseover="do This();doThat() ">


<a href="#" onmouseover="do Both()">


function doBoth(){
doThis();
doThat();
}



Would this work then?

onmouseover="ch angetext(conten t[1]);changetext(co ntent[2])"


Test it and see :-)

But what I aiming at doing is, having the content in two seperate divisions
change at the same time.
So perhaps I could have:
onmouseover="ch angetext(conten t[1]);changeimage(c ontent[2])"


Lets say you have a div tag with id="myDiv" and an image with
name="myImage". If you want to change it, then you pass a single
parameter to a single function that then changes it all.

var content = new Array()
content[0] = ['...','...'];
content[1] = ['...','...'];
content[2] = ['...','...'];
content[3] = ['...','...'];

function changeIt(param( {
document.getEle mentById('myDiv ').innerHTML = content[param][0];
document.images['myImage'].src = content[param][1];
}

<a href="#" onmouseover="ch angeIt(1)" onmouseout="cha ngeIt(0)
onclick="return false">Change it to 1</a>
<a href="#" onmouseover="ch angeIt(2)" onmouseout="cha ngeIt(0)
onclick="return false">Change it to 2</a>
<a href="#" onmouseover="ch angeIt(3)" onmouseout="cha ngeIt(0)
onclick="return false">Change it to 3</a>

And so on.

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq
Jul 23 '05 #7
On Sat, 08 Jan 2005 02:27:15 -0500 Randy Webb wrote:
Richard wrote:
On Fri, 07 Jan 2005 22:31:17 -0500 Randy Webb wrote:
Richard wrote: 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="dot his" onmouseover="do that">
<a href="#" onmouseover="do This();doThat() ">
<a href="#" onmouseover="do Both()">
function doBoth(){
doThis();
doThat();
}

Would this work then? onmouseover="ch angetext(conten t[1]);changetext(co ntent[2])"
Test it and see :-)
But what I aiming at doing is, having the content in two seperate
divisions
change at the same time.
So perhaps I could have:
onmouseover="ch angetext(conten t[1]);changeimage(c ontent[2])"

Lets say you have a div tag with id="myDiv" and an image with
name="myImage". If you want to change it, then you pass a single
parameter to a single function that then changes it all. var content = new Array()
content[0] = ['...','...'];
content[1] = ['...','...'];
content[2] = ['...','...'];
content[3] = ['...','...']; function changeIt(param( {
document.getEle mentById('myDiv ').innerHTML = content[param][0];
document.images['myImage'].src = content[param][1];
} <a href="#" onmouseover="ch angeIt(1)" onmouseout="cha ngeIt(0)
onclick="return false">Change it to 1</a>
<a href="#" onmouseover="ch angeIt(2)" onmouseout="cha ngeIt(0)
onclick="return false">Change it to 2</a>
<a href="#" onmouseover="ch angeIt(3)" onmouseout="cha ngeIt(0)
onclick="return false">Change it to 3</a> And so on.


Thanks Randy. I'll figure it out eventually.

Jul 23 '05 #8

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

Similar topics

4
17091
by: Tim | last post by:
Hope someone in the big wide world can help... What I want to do is have an image slideshow which automatically scrolls through a series of images very fast, then pauses when you move your mouse over the image. The images will flick through (at a rate of about 5 per second) then pause when the user onMouseOver's. Any help would be...
7
3331
by: windandwaves | last post by:
Hi Gurus I am trying to make this rather complicated maps with an a huge number of mouseovers and the like. I want to set up a function that OnMouseDown swaps the OnMouseOver and OnMouseOut for the same element. E.g. <A HREF="#" OnMouseOver="A(); return true" OnMouseOut"B(); return true;"
2
6546
by: news.west.cox.net | last post by:
I have been writing a practice sliding div navigation script. I am finding myself in the position where I need to force a div into showing the hover behavior defined in css. So my question is this. If I have two divs, is there a way to make the second div display its onmouseover behavior when the mouse is over div 1?
2
2723
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.
7
2790
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.
1
5200
by: Ciuin | last post by:
Again I need your help. This is the test page I am working on: http://www.manfredkooistra.de/zeugs/test/test.php Description: The page shows a centered image and a navigation menue position:fixed over it (position:absolute in IE 5 and 6). The menue consists of two parts: an image and a header, both external links, in the upper div;
1
1848
by: Goutour | last post by:
Hello, I am a 2-day old Javascript developer :-) and I have a problem. I am trying to do examples I find on net about using onmouse events. I found a javascript that generates flying objects, and I wanted to be able when I point my mouse on any of them to replace it with another picture. It is pretty straight forward to do that in html coding...
3
4181
by: Laser Lips | last post by:
HI All, Is it possible to do the following? object = document.getelementById('something'); object.onmouseover='alert("hi");'; ...................
4
3158
by: bgold12 | last post by:
Hey, I have kind of a weird problem. I have a span that I'm intentionally overflowing a table cell (<td>), so that it stretches over the table cells to the right of the parent table cell. I want the mouseover event to occur for the table cells that lie underneath the overflowed span, but every time i put the mouse on the span the mouseover...
0
7915
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
7841
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...
0
8204
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. ...
1
7965
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
8220
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6617
agi2029
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...
0
5392
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...
1
2345
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
0
1184
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.