Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Hiding 'insert' curson when hovering over text

Reply
Thread Tools

Hiding 'insert' curson when hovering over text

 
 
Paul M.
Guest
Posts: n/a
 
      07-24-2003
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
 
Reply With Quote
 
 
 
 
Vjekoslav Begovic
Guest
Posts: n/a
 
      07-24-2003
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." <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date not appearing when hovering mouse over clock in sys tray John Computer Support 4 07-18-2007 04:58 AM
Gmail - hovering contact info on mouse over - how to get rid of?? jeff@msn.com.net Computer Support 4 02-17-2006 05:22 AM
"Floating Layer" when hovering over a LinkButton GD ASP .Net 4 09-13-2005 09:42 PM
How to javascript Detail Text Box when Hovering over Images prubin@equilter.com Javascript 4 05-12-2005 08:20 PM
curson focus to end of text on form field jason@cyberpine.com Javascript 1 01-20-2004 02:09 PM



Advertisments