473,385 Members | 1,582 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.

Custom cursor on mouseover of mapped link

I have an image with several links in it in mapped areas. I am using a
custom cursor on the page and would like to have a custom cursor appear on
mouse over of the mapped links. Something like:

This works for the body, font or img tag:

<body style="cursor: url('cursor2.cur')">
<font style="cursor: url('cursor1.cur')">Text</font>
<img style="cursor: url('cursor1.cur')" src="...etc...">

This does not work for an area tag:

<AREA style="cursor: url('cursor1.cur')" shape=RECT coords=96,30,246,46
href="...etc...">

I'm think I will need to go to onmouseover/onmouseout functions to set the
style for an area tag? Thanks!


Jul 23 '05 #1
3 6879
DU
Simon Wigzell wrote:
I have an image with several links in it in mapped areas. I am using a
custom cursor on the page and would like to have a custom cursor appear on
mouse over of the mapped links. Something like:

This works for the body, font or img tag:

<body style="cursor: url('cursor2.cur')">
<font style="cursor: url('cursor1.cur')">Text</font>
I would not style the body and font with custom cursor. You also need to
provide a default cursor value in case the referenced resource (custom
cursor) is not fetched, loaded and rendered. Right now, only MSIE 6
supports (static, not animated) custom cursors. The next release of
Mozilla should also support custom cursors (not all types though).
<img style="cursor: url('cursor1.cur')" src="...etc...">
You also need to indicate the usemap attribute.

This does not work for an area tag:

<AREA style="cursor: url('cursor1.cur')" shape=RECT coords=96,30,246,46
href="...etc...">

You should always quote your attribute value of all your attributes.
"Why attribute values should always be quoted in HTML"
http://www.cs.tut.fi/~jkorpela/qattr.html

Does your document markup code and CSS code validate?
Can you provide the url?
I'm think I will need to go to onmouseover/onmouseout functions to set the
style for an area tag? Thanks!


In my opinion, you will confuse the user with so many custom cursors.
Custom cursors should be used sparingly and for very good reasons, like
identifying links which will open a new window (or recycle an already
opened window).

Your post has nothing really to do with javascript; you should have
posted your question in a css newsgroup/forum.

DU
--
The site said to use Internet Explorer 5 or better... so I switched to
Mozilla 1.7.3 :)
Jul 23 '05 #2

"DU" <dr*******@hotNOSPAMmail.com> wrote in message
news:38*************@uni-berlin.de...
Simon Wigzell wrote:
I have an image with several links in it in mapped areas. I am using a
custom cursor on the page and would like to have a custom cursor appear
on mouse over of the mapped links. Something like:

This works for the body, font or img tag:

<body style="cursor: url('cursor2.cur')">
<font style="cursor: url('cursor1.cur')">Text</font>


I would not style the body and font with custom cursor. You also need to
provide a default cursor value in case the referenced resource (custom
cursor) is not fetched, loaded and rendered. Right now, only MSIE 6
supports (static, not animated) custom cursors. The next release of
Mozilla should also support custom cursors (not all types though).
<img style="cursor: url('cursor1.cur')" src="...etc...">


You also need to indicate the usemap attribute.

This does not work for an area tag:

<AREA style="cursor: url('cursor1.cur')" shape=RECT coords=96,30,246,46
href="...etc...">


You should always quote your attribute value of all your attributes.
"Why attribute values should always be quoted in HTML"
http://www.cs.tut.fi/~jkorpela/qattr.html

Does your document markup code and CSS code validate?
Can you provide the url?
I'm think I will need to go to onmouseover/onmouseout functions to set
the style for an area tag? Thanks!


In my opinion, you will confuse the user with so many custom cursors.
Custom cursors should be used sparingly and for very good reasons, like
identifying links which will open a new window (or recycle an already
opened window).

Your post has nothing really to do with javascript; you should have posted
your question in a css newsgroup/forum.

DU
--
The site said to use Internet Explorer 5 or better... so I switched to
Mozilla 1.7.3 :)


Thanks, but the question was "how do a make a custom cursor work for an
area". The examples I gave were for doing it in CSS which does not work for
area so I was hoping there would be a javascript answer. It looks like all
you have done is glance at the CSS examples I gave and have completely
ignored the actual question!
Jul 23 '05 #3
"Simon Wigzell" <si**********@shaw.ca> wrote in message
news:COGVd.564122$8l.182914@pd7tw1no...
I have an image with several links in it in mapped areas. I am using a
custom cursor on the page and would like to have a custom cursor appear on
mouse over of the mapped links. Something like:

This works for the body, font or img tag:

<body style="cursor: url('cursor2.cur')">
<font style="cursor: url('cursor1.cur')">Text</font>
<img style="cursor: url('cursor1.cur')" src="...etc...">

This does not work for an area tag:

<AREA style="cursor: url('cursor1.cur')" shape=RECT coords=96,30,246,46
href="...etc...">

I'm think I will need to go to onmouseover/onmouseout functions to set the
style for an area tag? Thanks!


Try this instead
map{cursor:pointer}

Doesn't work for Firefox though.
Jul 23 '05 #4

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

Similar topics

2
by: Csaba2000 | last post by:
The following code has me so confused, I don't even know the right questions to ask. Opera 7.01 and IE 5.5 both exhibit behaviours I don't understand while NN 6.1 seems to ignore me altogether. ...
1
by: Woody | last post by:
i need to know how to make a preloaded image appear next to the cursor when i mouseover a link... can anyone help me? it is preferred, if you can, that maybe a table appears, next to the...
4
by: VK | last post by:
I have this code failing to work in IE: getElementsByTagName doesn't return elements from my JS namespace. What's wrong? <html xmlns:js> <head> <title>Que</title> <meta...
2
by: Brad | last post by:
Hi all, newbie here. I'm currently designing a custom splitter control... When the mouse hovers over a certain area on my splitter I need to be able to display a custom cursor that I've designed....
2
by: Jay Walker | last post by:
I created a custom DataGridColumn based on Marcie Robillard's MSDN Article: Creating Custom Columns for the ASP.NET Datagrid...
6
by: Peter Oliphant | last post by:
I've now asked how three times in this forum with no answers. So I went to the 'windowsforms' newsgroup, and found this post, also unanswered, with the same problem: "Hello, I've tried to...
2
by: spamforsteve | last post by:
Hi, all! I have an imagemap of a floor of offices. I have various events and an onclick function working just fine, but I'd like to be able to change the color of the region being hovered over. ...
1
by: piccolo | last post by:
This is the first time I've posted a 'help' request, so please be patient. I've created a DOM web page where with the usage of usemap images on the page change upon rollover using JavaScript....
1
by: dheepakk | last post by:
Hi All, When a mouseover event takes place over a link the popup window is displayed. I also have a mouseout on the link.So if the popup window comes up,has a dimension such that 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...

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.