Closed Thread Icon

Topic awaiting preservation: Changing the cursor with an onClick function (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=8888" title="Pages that link to Topic awaiting preservation: Changing the cursor with an onClick function (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Changing the cursor with an onClick function <span class="small">(Page 1 of 1)</span>\

 
krets
Paranoid (IV) Mad Scientist

From: KC, KS
Insane since: Nov 2002

posted posted 10-03-2003 17:54

OK, here's what's been requested of me (not that I am personally happy about it you understand).

Take a look at this page:
http://www.11oh1.net/test/general.html

When you look you can see the basic idea; someone clicks the two buttons to see different products up above and when they do the button they just clicked turns grey. My boss would also like the cursor to change to a circle with a line through it whenever someone hovers the mouse over a greyed button so they know they can't click on it. (I know, I know, trust me I've tried and tried.)

Luckily we have a captive audience here and we know that the people will be looking at this page with IE. If you're don't look at it in IE and I cannot assure that you'll be looking at anything even remotely close to what I'm seeing.

So, my question is how can I go about changing the cursor to an "unavailable" cursor only when someone clicks on a greyed button?

Come on you JS geniuses, help me out.

:::11oh1:::

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 10-03-2003 19:55

Could you convince him to have it change to a pointer cursor instead? If the problem in your boss's mind is that the hand makes it look clickable, maybe he'll be content with the cursor just staying normal.

Let's see. Before I give you the answer, a suggestion: change your hyperlinks from href="#" to href="", and add "return false;" to the end of your onclick events. It's cleaner that way.

To do the cursor thing, use this code:

document.getElementById('IDofbutton').style.cursor = 'not-allowed';

standard cursor values are available at http://www.w3.org/TR/CSS2/ui.html#cursor-props . I would suggest using "default" if your boss likes it. IE cursors are available at http://www.echoecho.com/csscursors.htm . You might also consider no-drop.

[This message has been edited by Slime (edited 10-03-2003).]

krets
Paranoid (IV) Mad Scientist

From: KC, KS
Insane since: Nov 2002

posted posted 10-03-2003 20:34

Thanks Slime, that works like a charm.

Now I'm going to find a corner and cry because our robots have IE 4.0 installed on them and I don't know if there's going to be a way to get them upgraded to a new version of IE.

*goes off to find a corner*

:::11oh1:::

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 10-03-2003 22:23

Yes, IE 4.0 is a good reason to cry.

Rinswind 2th
Maniac (V) Inmate

From: Den Haag: The Royal Residence
Insane since: Jul 2000

posted posted 10-04-2003 01:42

~Cleans out a comfy corner for krets ~ here you go, here some black pills too.
Yes that IE4(!) must scare the hell out of you. The monster should stayed locked up in a iron chest on the bottom of the ocean.

__________________________________________
"Art has to be forgotten. Beauty must be realized."
Piet Mondriaan

krets
Paranoid (IV) Mad Scientist

From: KC, KS
Insane since: Nov 2002

posted posted 10-13-2003 17:56

Still working great BUT, how can I turn off error reporting for that one since it won't work in IE 4 and it's giving an error everytime someone clicks on that button.

:::11oh1:::

« BackwardsOnwards »

Show Forum Drop Down Menu