473,326 Members | 2,128 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

cursor type

Hi,

I have a problem changing the cursor type with javascript. I have a
button with an mouseover effect (change of color and cursor type). It
works fine in Netscape 7.x and IE 6.x but not in IE 5.5 I'm using the
following script:

function change(element,mode) {
if (mode=="in") {
cursortype = 'pointer'
colorval = '#FF491B'
} else if (mode=="out") {
cursortype = ''
colorval = '#F47240'
}
element.style.cursor=cursortype;
element.style.background=colorval;
}

The error I'm getting with IE 5.5 is "cursor type not defined..." or
something but the pointer is supposed to work even with IE 4.x

Does anybody has a solution for this problem?
Thanks!
Cheers Olaf
Jul 20 '05 #1
3 4363
"olimoli" <oh****@web.de> wrote in message
news:95**************************@posting.google.c om...
Hi,

I have a problem changing the cursor type with javascript. I have a
button with an mouseover effect (change of color and cursor type). It
works fine in Netscape 7.x and IE 6.x but not in IE 5.5 I'm using the
following script:

function change(element,mode) {
if (mode=="in") {
cursortype = 'pointer'
colorval = '#FF491B'
} else if (mode=="out") {
cursortype = ''
colorval = '#F47240'
}
element.style.cursor=cursortype;
element.style.background=colorval;
}

The error I'm getting with IE 5.5 is "cursor type not defined..." or
something but the pointer is supposed to work even with IE 4.x

Does anybody has a solution for this problem?
Thanks!
Cheers Olaf

If "mode" is neither "in" or "out" then "cursortype" will not be defined.

You might want to use this snippet:

if (mode=="in") {
cursortype = 'pointer';
colorval = '#FF491B';
} else {
cursortype = '';
colorval = '#F47240';
}
Jul 20 '05 #2
DU
McKirahan wrote:
"olimoli" <oh****@web.de> wrote in message
news:95**************************@posting.google.c om...
Hi,

I have a problem changing the cursor type with javascript. I have a
button with an mouseover effect (change of color and cursor type). It
works fine in Netscape 7.x and IE 6.x but not in IE 5.5 I'm using the
following script:

function change(element,mode) {
if (mode=="in") {
cursortype = 'pointer'
colorval = '#FF491B'
} else if (mode=="out") {
cursortype = ''
colorval = '#F47240'
}
element.style.cursor=cursortype;
element.style.background=colorval;
}

The error I'm getting with IE 5.5 is "cursor type not defined..." or
something but the pointer is supposed to work even with IE 4.x

Does anybody has a solution for this problem?
Thanks!
Cheers Olaf


If "mode" is neither "in" or "out" then "cursortype" will not be defined.

You might want to use this snippet:

if (mode=="in") {
cursortype = 'pointer';
colorval = '#FF491B';
} else {
cursortype = '';
colorval = '#F47240';
}

cursortype = "auto";
instead of
cursortype = '';
is slightly better (more robust; parsing related) IMO.

DU
Jul 20 '05 #3
olimoli wrote:
Hi,

I have a problem changing the cursor type with javascript. I have a
button with an mouseover effect (change of color and cursor type). It
works fine in Netscape 7.x and IE 6.x but not in IE 5.5 I'm using the
following script:

function change(element,mode) {
if (mode=="in") {
cursortype = 'pointer'
colorval = '#FF491B'
} else if (mode=="out") {
cursortype = ''
colorval = '#F47240'
}
element.style.cursor=cursortype;
element.style.background=colorval;
}

The error I'm getting with IE 5.5 is "cursor type not defined..." or
something but the pointer is supposed to work even with IE 4.x

Does anybody has a solution for this problem?


IE 4.0 through 5.5 didn't support the cursor type 'pointer' (only the
non-standard 'hand').

Jul 20 '05 #4

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

Similar topics

3
by: robert | last post by:
Mr. Kyte's article doesn't use cursors, while Mr. Feuerstein's book examples do. my recollection of conventional wisdom is to avoid using cursors. is this difference merely a question of style,...
1
by: Jim Garrison | last post by:
Oracle has a tech article describing how a Java stored procedure can return a REF CURSOR: http://www.oracle.com/technology/sample_code/tech/java/codesnippet/jdbc/refcur/index.html Here's the...
3
by: Csaba2000 | last post by:
I have set onmousedown to change the cursor, but this setting is ignored (IE 5.5; NN 6.1 on Win 2K Pro) until the mouse is either moved or the mouse button is released. On Opera 7.01, the setting...
10
by: Just Me | last post by:
Does Me.Cursor.Current=Cursors.WaitCursor set the current property of Me.Cursor to Cursors.WaitCursor And Me.Cursor.Current=Cursors.Default set the Me.Current property to something (default)...
0
debasisdas
by: debasisdas | last post by:
SAMPLE CODE USING RECORD =========================== declare cursor c1 is select * from dept; type drec is record (a dept.deptno%type, b dept.dname%type, c dept.loc%type); type ttype is...
0
debasisdas
by: debasisdas | last post by:
RESTRICTIONS ON CURSOR VARIABLES ================================= Currently, cursor variables are subject to the following restrictions: Cannot declare cursor variables in a package spec. ...
0
debasisdas
by: debasisdas | last post by:
This thread contains some useful tips/samples regarding some advance concepts in cursors. FEW MORE EXAMPLES =================== declare er emp%rowtype; cursor c1 is select * from emp; begin...
0
debasisdas
by: debasisdas | last post by:
SAMPLE CODE TO SHOW USE OF REFCURSOR ======================================= EXAMPLE #1 ---------------------- declare --declare the fer cursor. type my_ref_cur_typ is ref cursor; --declare...
0
debasisdas
by: debasisdas | last post by:
Cursor Variable Returning %ROWTYPE ----------------------------------------------------------- DECLARE TYPE TmpCurTyp IS REF CURSOR RETURN emp%ROWTYPE; tmp_cv TmpCurTyp;TYPE EmpCurTyp IS REF...
2
by: ACS | last post by:
I have a C# application where I've grabbed a control's cursor handle using the WINAPI function GetCursor(). This returned an IntPtr and I want to check what type of cursor this is (arrow, sizing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.