473,396 Members | 2,034 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,396 software developers and data experts.

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 2776
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...

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.