473,574 Members | 2,264 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

OnMouseOver question

Hi All,

I have some text on my page. This is normal text, not an anchor or
link or anything. I want to perform an action when the mouse moves
over it.

Can I to an onmouseover with simple text? If not, can I make an anchor
that goes nowhere so I can do the onmouseover????

Thanks,

Arthur

Jan 18 '06 #1
6 1240
include your text in a <span> and do an onmouseover on it:

<span onmouseover="al ert('it works')">my text</span>

Jan 18 '06 #2

Never saw that before........i nteresting..... .

Jan 18 '06 #3
<span> is a styleable DOM object, and it doesn't break the line as
<div> so you can use it inline whereever you want

Jan 18 '06 #4
impaler wrote:
<span> is a styleable DOM object,
`<span>' is the start tag of the `span' element which has the
`onmouseover' attribute. This does not have anything to do with
style(sheet)s, and a style would be applied to element, not to
the DOM object it is represented by.
and it doesn't break the line as <div>
`span' is by default an inline-level element, not by default a
block-level element such as the `div' element is. Therefore it
does not create a new block by default as the latter does.
so you can use it inline whereever you want


Wrong. A `span' element MUST NOT occur in a `textarea' element
in HTML 4.01/XHTML 1.0 Transitional, and it MUST NOT occur as
child element of the `body' element in HTML 4.01/XHTML 1.0 Strict,
for example.
PointedEars
Jan 18 '06 #5
Rather than having a popup, can I do one of those text annotations?
Similar to when you move over an icon in Windows, and it displays a
small text box telling you the file name, size, date of
creation....... ...

Jan 18 '06 #6
am****@iwc.net wrote:
Rather than having a popup, can I do one of those text annotations?
Similar to when you move over an icon in Windows, and it displays a
small text box telling you the file name, size, date of
creation....... ...


The `title' attribute can be used for this on most (X)HTML elements.
Anything more advanced requires either a positioned block element that
is showed by application of a CSS rule, or client-side script, creating
and manipulating the respective element via the DOM object it is
represented by.

Please read <URL:http://www.safalra.com/special/googlegroupsrep ly/>, as
this is implements the posting guidelines suggested by the newsgroup's
FAQ <URL:http://jibbering.com/faq/>.
PointedEars
Jan 18 '06 #7

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...
4
1597
by: Applebrown | last post by:
I'm trying my hand at developing a new website for my professional career, and am trying to implement a simple Rollover > Pop-out Menu system, and am finding the javascript confusing to do. I am using Photoshop and Dreamweaver/Fireworks, and have all of my normal and over button graphics finished, and created one simple pop-out in Fireworks. ...
7
2269
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...
2
6545
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?
6
1165
by: Shawn B. | last post by:
Greetings, I have a troubling issue that I'm not sure how to approach at this point. Given the HTML tag (any tag will do): <div id='divSomething' onmouseover='...'>Next we write onmouseover='alert(message);' ...</div>
1
1844
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
4179
by: Laser Lips | last post by:
HI All, Is it possible to do the following? object = document.getelementById('something'); object.onmouseover='alert("hi");'; ...................
4
3157
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
7719
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...
1
7808
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
8096
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
6450
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
5299
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
3739
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...
0
3749
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2238
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
1055
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.