473,652 Members | 3,070 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Re: Using JavaScript to Customize Mouse Pointer Graphic??

Prisoner at War meinte:
However, the really odd thing is that you cannot use a "fall-back"
like

style="cursor: url(relative/path/file.ani); cursor:pointer; "
(a) This has nothing to do with JS.
(b) This is not a fallback. You just overwrite your custom-pointer
property with the standard one. In your case you will *always* get a
cursor: pointer.
as is recommended, in case the browser didn't understand...we ll,
nothing worked in MSIE 7 until I had *removed* that "fall-back,"
"cursor:pointer "!
Small wonder...
style="cursor: url(relative/path/file.ani); cursor:pointer; "

doesn't work, even in MSIE 7, but

style="cursor: url(relative/path/file.ani);"
does!

So, the custom pointer can only show up in MSIE 7, but only if the
"fall-back" hand pointer used by Opera and Firefox isn't present --
else MSIE 7 "prefers" it and uses it, instead of the custom pointer!!
How about
(a) obtaining some *basic* knoledge of css
(b) post into newsgroups dealing with those issues

x'post and f'up set

Gregor

--
http://photo.gregorkofler.at ::: Landschafts- und Reisefotografie
http://web.gregorkofler.com ::: meine JS-Spielwiese
http://www.image2d.com ::: Bildagentur für den alpinen Raum
Jun 27 '08 #1
7 2700
On Apr 21, 4:31 am, Gregor Kofler <use...@gregork ofler.atwrote:
>

(a) This has nothing to do with JS.
True -- but having asked on comp.lang.javas cript about using
JavaScript, it's the answer I got. I now realize -- in less than a
day of research! -- that it's CSS, but I appreciate the answer all the
same.
(b) This is not a fallback.
So what's a fall-back, then?
You just overwrite your custom-pointer
property with the standard one. In your case you will *always* get a
cursor: pointer.
I thought I was simply following the instructions on something like
http://www.quirksmode.org/css/cursor.html....
Small wonder...
Actually, it's a real puzzle how MSIE 7 is more W3C-compliant over
this little thing than Opera and even Firefox!
How about
(a) obtaining some *basic* knoledge of css
I've got enough to customize existing CSS files for my own needs.
That seems "basic" enough to me.

Moreover, I just don't think a newsgroup should be an invitation-only
symposium. This is the information superhighway -- new drivers get on
the road all the time.
(b) post into newsgroups dealing with those issues
I have been, actually, even if unbeknownst to you.
x'post and f'up set
?
Gregor

--http://photo.gregorkof ler.at::: Landschafts- und Reisefotografie http://web.gregorkofle r.com ::: meine JS-Spielwiesehttp://www.image2d.com ::: Bildagentur für den alpinen Raum
Jun 27 '08 #2
Prisoner at War wrote:
On Apr 21, 4:31 am, Gregor Kofler <use...@gregork ofler.atwrote:
>You just overwrite your custom-pointer
property with the standard one. In your case you will *always* get a
cursor: pointer.

I thought I was simply following the instructions on something like
http://www.quirksmode.org/css/cursor.html....
>Small wonder...

Actually, it's a real puzzle how MSIE 7 is more W3C-compliant over
this little thing than Opera and even Firefox!
Eh? How to get that? Firefox does support 'hand'. 'hand' is a MS
invention. IE7 does not support 'url' or other graphic formats which is
part of the W3 recommendation. If graphic is use FF for does require a
generic fallback but this too is in keeping with the recommendation:
"The user agent retrieves the cursor from the resource designated by the
URI. If the user agent cannot handle the first cursor of a list of
cursors, it should attempt to handle the second, etc. If the user agent
cannot handle any user-defined cursor, *it must use the generic cursor
at the end of the list.*"

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Jun 27 '08 #3
Jonathan N. Little wrote:
Eh? How to get that? Firefox does support 'hand'. 'hand' is a MS
invention. IE7 does not support 'url' or other graphic formats which is
part of the W3 recommendation.
IE7 should support 'url'; the question is the format of the graphic
file that represents the custom cursor.
If graphic is use FF for does require a generic fallback but this too
is in keeping with the recommendation:

"The user agent retrieves the cursor from the resource designated by the
URI. If the user agent cannot handle the first cursor of a list of
cursors, it should attempt to handle the second, etc. If the user agent
cannot handle any user-defined cursor, *it must use the generic cursor
at the end of the list.*"
I think this is the best rule of thumb in practice indeed:

cursor: url('cursor.cur '), url('cursor.ani '),
url('cursor.png '), url('cursor.svg '), auto;

In conjunction with a great image converter like:
http://www.irfanview.com

A strange remark from W3:
http://www.w3.org/TR/SVG/interact.html#CursorElement

| A recommended approach for defining a platform-independent
| custom cursor is to create a PNG [PNG01] image [...]

I couldn't get PNG01 to work at least on MSIE. But then, even their
own demo on MSDN doesn't seem to work here (Vista MSIE 7.0.6., second
button '#2'):
http://samples.msdn.microsoft.com/wo...s/cursor_c.htm

--
Bart
Jun 27 '08 #4
On Apr 21, 11:54 am, Bart Van der Donck <b...@nijlen.co mwrote:
>
IE7 should support 'url'; the question is the format of the graphic
file that represents the custom cursor.
Indeed it does; I've been able to confirm that.
I think this is the best rule of thumb in practice indeed:

cursor: url('cursor.cur '), url('cursor.ani '),
url('cursor.png '), url('cursor.svg '), auto;
Yup -- that's the one! Opera 9 won't see any URI, but FF and MSIE can
have their pick of which file format to load!
In conjunction with a great image converter like:http://www.irfanview.com
How about GIMP?? Looks really powerful...it may be all I'll ever
need! I wonder if it does cursors (.ani, .cur), though...any 100%
free cursor creation programs you know of -- without spy/malware??
A strange remark from W3:http://www.w3.org/TR/SVG/interact.html#CursorElement

| A recommended approach for defining a platform-independent
| custom cursor is to create a PNG [PNG01] image [...]
Well! Is that true??

And what's PNG01?? Is that also .png or does it end .png01??
I couldn't get PNG01 to work at least on MSIE. But then, even their
own demo on MSDN doesn't seem to work here (Vista MSIE 7.0.6., second
button '#2'):http://samples.msdn.microsoft.com/wo...or/dhtml/refs/...
LOL, yeah, Martin Honnen had referenced that, I think, and I'd also
noted that Button #2 doesn't work!
--
Bart
Jun 27 '08 #5
Prisoner at War wrote:
Bart Van der Donck <b...@nijlen.co mwrote:
>...
In conjunction with a great image converter like:
http://www.irfanview.com

How about GIMP?? *Looks really powerful...it may be all I'll ever
need! *
GIMP might be okay too, but I'm a bit afraid of cursors, and in
particular the favoured Windows formats.
I wonder if it does cursors (.ani, .cur), though... any 100%
free cursor creation programs you know of -- without spy/malware??
I have been using IrfanView for many years. It has been certified by
www.download.com as "Tested spyware free"; you may want to check the
Spyware listings further at wish.
>A strange remark from W3:
http://www.w3.org/TR/SVG/interact.html#CursorElement
>* | A recommended approach for defining a platform-independent
* | custom cursor is to create a PNG [PNG01] image [...]

Well! *Is that true??
"True" is a bit relative here :) The PNG-format is heavily promoted by
the W3C; no surprise they mention it here.
And what's PNG01?? *
http://www.google.com/search?q=png
http://en.wikipedia.org/wiki/Portabl...nd_development
http://www.ietf.org/rfc/rfc2083.txt
Is that also .png or does it end .png01??
png.

--
Bart
Jun 27 '08 #6
Prisoner at War wrote:
On Apr 21, 2:44 pm, Gregor Kofler <use...@gregork ofler.atwrote:
>And you should know the difference between "font-family:
Arial, Verdana;" and "font-family: Arial; font-family: Verdana;".

Actually, verdana and arial look extremely similar.
No, you are missing the point, noting to do with Arial or Verdana but
the CSS rule syntax.

..correct { font-family: foo, bar; }
..wrong {font-family: foo; font-family: bar; }

Classes "correct" and "wrong" are *not* equivalent. "correct" rule say
use font "foo" but if foo is not available use "bar". But "wrong" sets
the font to "foo" and then changes it to call out font "bar". With class
"wrong" the font will never be "foo".

>A-ha. So what's the JS issue of your problem?

I was asking about how to use JavaScript to customize mouse pointers.
Turns out the answer I got concerned using CSS, but at the time I did
not know that and so just "ran" with the answer.
Agree, not the place for JS...

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Jun 27 '08 #7
On Tue, 22 Apr 2008 07:23:07 -0700 (PDT), Prisoner at War wrote:
On Apr 21, 2:44 pm, Gregor Kofler wrote:
>And you should know the difference between "font-family:
Arial, Verdana;" and "font-family: Arial; font-family: Verdana;".

Actually, verdana and arial look extremely similar.
Sure, if you compare them one isolated letter at a time.
Also (and mostly), what Jonathan said.
>I could also point out, that you shouldn't quote signatures. But I
suppose one has to be happy, that you're not top-posting.

This is really bizarre -- why not quote signatures??? Very, very
strange rules...I mean, why do people have signatures to their posts
if they don't want their signatures quoted??
Three reasons not to quote signatures:

1) You've already got the attribution lines up at the top, so there's no
need to quote the sig, too.

2) Some people's sigs are rather long. Go look at threads with (a lot of)
posts from Jerry Stuckle in them. He often gets in very long back-and-forth
discussions with users of GoogleGroups, and GG doesn't automatically trim
sigs from replies, and GG users don't know any better, and Jerry's too lazy
(or something) to trim out previous sigs (or other irrelevant content), and
his sparring partners don't do it either. But other sigs, longer and
shorter, are unnecessary for quoting. We waste enough bandwidth already.

3) You're not commenting on the sig (well, except in the very rare case
that you *are*), so it should be trimmed like all of the other points to
which you are not directly replying.

I don't mind if you quote *my* signature, but nobody else (except maybe a
shark or two) will be too happy about it.

--
John
Read about the UIP: http://improve-usenet.org/
Jun 27 '08 #8

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

Similar topics

3
1728
by: enki | last post by:
I am trying to learn basic resources. I am trying to load a bmp file I wrote with the win drawing program. I am trying to make this a pointer. The program complies and runs but the pointer dosnt change. I am using the free dev c++ complier from bloodshed. These are the pertent parts of the program. I have gotten another program to work that uses resources. resources.rc:
3
6221
by: Weston C | last post by:
Is there any way to use javascript to pull the color of the pixel under the mouse pointer off the page? Thanks, Weston ~==~ http://weston.canncentral.org/ weston8cann8central.org (remove eights to email me)
11
12682
by: gb | last post by:
Within a form, the usual way of submitting it is to use e.g. <INPUT TYPE="submit" VALUE="Send "> This produces the standard button. Is there an easy way to portray this as though it were a simple hypertext link? Second question: Is there any way to customize a submit button other than the text that it displays? i.e. can I change the colour and/or size?
1
3684
by: Peter Williams | last post by:
Hello All, I'm a newbie to this ng. I'm posting here because I have a question about debugging some javascript on some pages of my website. Please don't call me a "troll" -- because I'm not one. :-))) The next page is called "basic_snake" and creates a message which follows the cursor. Up until today, I used this type of message attached to the mouse pointer for the following pages on my website: index.html, delphi.html &...
3
1465
by: sunnysails | last post by:
Hi, is there a javascript function which tells the mouse pointer to "click" whereever it is on the screen? Best regards-sunnysails
6
4734
by: RC | last post by:
<a href="#" onmousedown="callMyFunction()">Press the mouse button</a> What I expect is when I or an user move mouse pointer over that link, and press the mouse button. Then will "callMyFunction()" over and over again until I release the mouse button (mouseup). But what I found out the onmousedown is just acts the same as onclick. It only "callMyFunction" once. If I want to call again, I need to keep repeat mousedown, mouseup like...
9
3866
by: weirdwoolly | last post by:
Hopefully someone will be able to help. I have written a stored procedure in C++ called from a Java test harness to validate the graphic data types in C++ and their use. I have declared the vargraphic input parameters along the following lines in i_vargraphic100 vargraphic(100) and they are populated from String's in java.
13
2197
by: Prisoner at War | last post by:
I know about the * * style="cursor: pointer; cursor: hand;" * * attribute of the <imgtag, but is there a way JavaScript can "load in" one's own graphic for such events?? How? TIA!
2
3983
by: CarJa017 | last post by:
hello I am new in writing javascript, I am doing a web page that when an user rolls the mouse over a picture a text will be display in an specific part of the webpage(iframe) and when the user moves out the mouse the text will disapear. Here is some of my code but at this point it is not clearing the text when the mouse is out, any help will be much apreciate. <title>Parts of the Brain</title> <link href="brain.css" rel="stylesheet"...
0
8703
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
8467
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
7302
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...
1
6160
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5619
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();...
0
4145
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...
0
4291
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2703
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
2
1591
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.