HighDots Forums  

Re: Using JavaScript to Customize Mouse Pointer Graphic??

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Re: Using JavaScript to Customize Mouse Pointer Graphic?? in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Prisoner at War
 
Posts: n/a

Default Re: Using JavaScript to Customize Mouse Pointer Graphic?? - 04-21-2008 , 09:58 AM






On Apr 21, 4:31 am, Gregor Kofler <use... (AT) gregorkofler (DOT) at> wrote:
Quote:

(a) This has nothing to do with JS.
True -- but having asked on comp.lang.javascript 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.

Quote:
(b) This is not a fallback.
So what's a fall-back, then?

Quote:
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....

Quote:
Small wonder...
Actually, it's a real puzzle how MSIE 7 is more W3C-compliant over
this little thing than Opera and even Firefox!

Quote:
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.

Quote:
(b) post into newsgroups dealing with those issues
I have been, actually, even if unbeknownst to you.

Quote:
x'post and f'up set
?

Quote:
Gregor

--http://photo.gregorkofler.at::: Landschafts- und Reisefotografiehttp://web.gregorkofler.com ::: meine JS-Spielwiesehttp://www.image2d.com ::: Bildagentur für den alpinen Raum


Reply With Quote
  #2  
Old   
Jonathan N. Little
 
Posts: n/a

Default Re: Using JavaScript to Customize Mouse Pointer Graphic?? - 04-21-2008 , 11:17 AM






Prisoner at War wrote:
Quote:
On Apr 21, 4:31 am, Gregor Kofler <use... (AT) gregorkofler (DOT) at> wrote:

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


Reply With Quote
  #3  
Old   
Bart Van der Donck
 
Posts: n/a

Default Re: Using JavaScript to Customize Mouse Pointer Graphic?? - 04-21-2008 , 11:54 AM



Jonathan N. Little wrote:

Quote:
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.

Quote:
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

Quote:
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


Reply With Quote
  #4  
Old   
Prisoner at War
 
Posts: n/a

Default Re: Using JavaScript to Customize Mouse Pointer Graphic?? - 04-21-2008 , 12:45 PM



On Apr 21, 11:54 am, Bart Van der Donck <b... (AT) nijlen (DOT) com> wrote:
Quote:
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.

Quote:
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!

Quote:
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??

Quote:
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??

Quote:
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!

Quote:
--
Bart


Reply With Quote
  #5  
Old   
Bart Van der Donck
 
Posts: n/a

Default Re: Using JavaScript to Customize Mouse Pointer Graphic?? - 04-21-2008 , 01:23 PM



Prisoner at War wrote:

Quote:
Bart Van der Donck <b... (AT) nijlen (DOT) com> wrote:

...
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.

Quote:
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.

Quote:
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.

Quote:
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

Quote:
Is that also .png or does it end .png01??
png.

--
Bart


Reply With Quote
  #6  
Old   
Prisoner at War
 
Posts: n/a

Default Re: Using JavaScript to Customize Mouse Pointer Graphic?? - 04-22-2008 , 10:23 AM



On Apr 21, 2:44 pm, Gregor Kofler <use... (AT) gregorkofler (DOT) at> wrote:
Quote:
cursor: url(...), pointer;
Right, syntax error on my part.

Quote:
Sure. You've also noted, that it says:

"Since Explorer 6 and 7 support pointer, there's no more reason to use
hand, except when older Explorers are part of your target audience. In
that case, the only cross-browser syntax is...

...Note that the two declarations must be in this order."

(You see: It's only to provide "hand" for IE5 and 5.5, coz' they don't
know "pointer".)
Yes. It all makes sense now, now that I know the proper syntax or
"grammar"...but the general concept I did get.

Quote:
Well, if you're past the "basic" level you should not need to ask "what
a fallback is".
I did. It was a syntax error on my part. I knew what a fall-back was
but didn't implement it properly, syntax-wise.

Quote:
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.

Quote:
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.

Quote:
SNIP

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??

Quote:
SNIP

Reply With Quote
  #7  
Old   
Jonathan N. Little
 
Posts: n/a

Default Re: Using JavaScript to Customize Mouse Pointer Graphic?? - 04-22-2008 , 10:42 AM



Prisoner at War wrote:
Quote:
On Apr 21, 2:44 pm, Gregor Kofler <use... (AT) gregorkofler (DOT) at> 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.
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".


Quote:
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


Reply With Quote
  #8  
Old   
John Hosking
 
Posts: n/a

Default Re: Using JavaScript to Customize Mouse Pointer Graphic?? - 04-22-2008 , 04:43 PM



On Tue, 22 Apr 2008 07:23:07 -0700 (PDT), Prisoner at War wrote:

Quote:
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.

Quote:
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/


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.