473,467 Members | 1,549 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Hiding 'insert' curson when hovering over text

Hi,
This might be more of an HTML question, but I'm encountering it via
a javascript function. I'm trying to do rollovers without using
images. Here's some of the code:

<script type="text/javascript">
var previousBgColor;
var previousTextColor;
function mouseOver(obj)
{
previousTextColor = obj.style.color;
previousBgColor = obj.bgColor;
obj.style.color='#9999ff';
obj.bgColor='#99cc66';
}
function mouseOut(obj)
{
obj.style.color = previousTextColor;
obj.bgColor = previousBgColor;
//alert(previousBgColor);
}
function goHref(link)
{
window.location='/index.html?category=' + link;
}
</script>

Here's how I call it in the <body>

<table ...>
<tr>
<td id="computers" class="navbarTop" bgcolor="#9999ff" width="25%"
onmouseover="mouseOver(this)"
onmouseout="mouseOut(this)"
onclick="goHref('computers')">Computers</td>
</tr>
...more of the same
</table>

from the external CSS:
..navbarTop {
color: blue;
font-weight: bold;
text-align: center;
font-family: Arial, Helvetica, sans-serif;
}

All of this works OK-- colors change, links are followed, except when
I float the mouse over the actual text of the <td> (not the
background), it turns into an 'insert' cursor. Is there a way to
disable the insert cursor or to use an element which doesn't show an
insert cursor when hovering over text? I don't want to have to use
images, as much of the page is dynamic and I also don't have time to
make custom images. Thanks for any help.

Paul
Jul 20 '05 #1
1 2778
That's CSS issue.

This is what you need:

.navbarTop {
color: blue;
font-weight: bold;
text-align: center;
font-family: Arial, Helvetica, sans-serif;
cursor: default;
^^^^
}

"Paul M." <pa************@mortgagefamily.com> wrote in message
news:f2*************************@posting.google.co m...
Hi,
This might be more of an HTML question, but I'm encountering it via
a javascript function. I'm trying to do rollovers without using
images. Here's some of the code:

<script type="text/javascript">
var previousBgColor;
var previousTextColor;
function mouseOver(obj)
{
previousTextColor = obj.style.color;
previousBgColor = obj.bgColor;
obj.style.color='#9999ff';
obj.bgColor='#99cc66';
}
function mouseOut(obj)
{
obj.style.color = previousTextColor;
obj.bgColor = previousBgColor;
//alert(previousBgColor);
}
function goHref(link)
{
window.location='/index.html?category=' + link;
}
</script>

Here's how I call it in the <body>

<table ...>
<tr>
<td id="computers" class="navbarTop" bgcolor="#9999ff" width="25%"
onmouseover="mouseOver(this)"
onmouseout="mouseOut(this)"
onclick="goHref('computers')">Computers</td>
</tr>
...more of the same
</table>

from the external CSS:
.navbarTop {
color: blue;
font-weight: bold;
text-align: center;
font-family: Arial, Helvetica, sans-serif;
}

All of this works OK-- colors change, links are followed, except when
I float the mouse over the actual text of the <td> (not the
background), it turns into an 'insert' cursor. Is there a way to
disable the insert cursor or to use an element which doesn't show an
insert cursor when hovering over text? I don't want to have to use
images, as much of the page is dynamic and I also don't have time to
make custom images. Thanks for any help.

Paul

Jul 20 '05 #2

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

Similar topics

1
by: jason | last post by:
Hello. I've got this page that refreshes automatically and I am able to set the focus on a specific field at page load with. However the cursor goes back to position 1. In some cases my users...
2
by: Noloader | last post by:
Hello, Access XP, SQL Server 2000 Is it possible to hide a SP under Queries in Access, yet still be able to Execute it from Access? (Similar to hiding Tables, then using Views) We hooked...
4
by: Alan Seunarayan | last post by:
Hello, I have a number of ColumnHeaders that are 'hidden' (width set to zero). However, it is still possible to size them. The reason why they are hidden is to give the illusion that they do...
2
by: Just Me | last post by:
With a TreeView control and a MouseHover event is there a way to determine which node we are hovering over? Thanks in advance
3
by: teranews | last post by:
My question is this... Is 'LINK'ing a stylesheet required before 'IMPORT'ing another for successful hovering? I have a problem which cropped up with the introduction of IE 7 Beta 2... Yes.....
4
by: Jon | last post by:
Hi, I am calling the function showpopupWindow(item) to open and write a popup window. When testing in IE6 locally the popup window displays my text in both the title and status bars but when...
1
by: max | last post by:
hello (is this a css or a javascript question? or both?) when hovering, I can change the background (bg) color of a field (div), e.g. http://www.bep-zuerich.ch/hover4.htm with javascript I...
19
by: Steve | last post by:
Hi there, I'm having a problem with a webpage where hoving over the top navigation links causes my footer to jump up to the centre of the page! It only happens with IE7, and works fine with the...
5
by: kimiraikkonen | last post by:
Hi, I couldn't find a necessary class which shows when mouse hovers on a link in Webbrowser control. Think of there's a status bar(text), when mouse comes on a link, the URL must be shown in...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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,...
1
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...
0
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.