faqts : Computers : Programming : Languages : JavaScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

29 of 57 people (51%) answered Yes
Recently 7 of 10 people (70%) answered Yes

Entry

How Can I change the mouse pointer?

Apr 6th, 2008 20:00
ha mo, Colin Fraser, Milko Gonzalez,


I have not done this for a while, so I have had to rely upon memory for
this one, if I recall correctly, Netscape never used to allow you to
manually change cursors, IE did since ver 4 but not before, however,
having said that, I have no idea if NS v 6.xx does allow you to
manipulate cursors or not. The cursors available are 
    auto
    crosshair
    default
    hand 
    move 
    e-resize 
    ne-resize 
    nw-resize 
    n-resize 
    se-resize 
    sw-resize 
    s-resize 
    w-resize 
    text 
    wait 
    help
(straight from a Windows 98 book this is so you may want to check up on
it, things may have changed ) 
Anyway the code goes something like : 
<span id="aSpan">Here is some text in a span</span> which is followed by
more text which is outside a span.
<a href="nextpage.htm" id="newLink">Go to the next page</a>
<img src="apic.gif" id="myImg" alt="This is an image of my toe jam">
<p id="sText">Some text in a paragraph of perfectly useless text</p>
<script><!--
if (document.all) {
    document.all("aSpan").style.cursor = 'crosshair';
    document.all("newLink").style.cursor = 'wait';
    document.all("myImg").style.cursor = 'help';
    document.all("sText").style.cursor = 'hand';
    }
//--></script>
You may want to adapt this for NS 6, but it just wont work in any NS
before then. 
good luck..
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com