473,748 Members | 9,641 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.cu r')">
<font style="cursor: url('cursor1.cu r')">Text</font>
<img style="cursor: url('cursor1.cu r')" src="...etc..." >

This does not work for an area tag:

<AREA style="cursor: url('cursor1.cu r')" shape=RECT coords=96,30,24 6,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 6906
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.cu r')">
<font style="cursor: url('cursor1.cu r')">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.cu r')" src="...etc..." >
You also need to indicate the usemap attribute.

This does not work for an area tag:

<AREA style="cursor: url('cursor1.cu r')" shape=RECT coords=96,30,24 6,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*******@hotN OSPAMmail.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.cu r')">
<font style="cursor: url('cursor1.cu r')">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.cu r')" src="...etc..." >


You also need to indicate the usemap attribute.

This does not work for an area tag:

<AREA style="cursor: url('cursor1.cu r')" shape=RECT coords=96,30,24 6,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**********@s haw.ca> wrote in message
news:COGVd.5641 22$8l.182914@pd 7tw1no...
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.cu r')">
<font style="cursor: url('cursor1.cu r')">Text</font>
<img style="cursor: url('cursor1.cu r')" src="...etc..." >

This does not work for an area tag:

<AREA style="cursor: url('cursor1.cu r')" shape=RECT coords=96,30,24 6,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:poin ter}

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
4579
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. The upshot: .style.cursor seems to be ignored under certain circumstances. Let's take something that's mostly repeatable and maybe someone can explain to me what's happening. In Opera 7.01
1
1888
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 cursor, with three or so images in the table... any suggestion or links are much appreciated!!
4
2528
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 http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
2
2420
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. I've tried several ways to assign my custom cursor to a cursor variable, the most obvious being by the filename: myCursor = new Cursor("c:\\myCursor.cur"); and then assign it as the current cursor when in position: Cursor.current = myCursor
2
3199
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 http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/creatingcustomcolumns.asp The problem I am having is that the data in the custom datagridcolumn is not saved to viewstate and after postback, the column does not contain data.
6
5053
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 find something on this in the newsgroups but came up with nada: I'm trying to create a custom cursor in VS2005. I have a .cur file
2
3130
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. Is there any way to do this? Presumably I could just read the coords of the region, create a floating layer dynamically, and change the color, no? Unfortunately, I can't manage to read the coords property, and I'm not entirely certain how to...
1
4577
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. Other than href, is there a way to make the cursor change upon rollover? Only when a particular area has been clicked on do I wish for others to react to a rollover. This is all done in JS within the same page, and it works - except for the mouse...
1
4355
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 mouse(currently on the link) falls within the popup edges, the popup starts flickering without totally coming up.This is due to the fact the mouseout and mouseover events are triggered again due to interference of the generated popup with the mouse pointer. ...
0
8828
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,...
0
9537
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9367
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9319
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,...
0
9243
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8241
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4599
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3309
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
3
2213
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.