PassMark Logo
Home » Forum

html search box and onmouseover

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • naartjie
    replied
    Thanks Ray. I then found that this doesn't work in Firefox so changed 'hand' to 'pointer' (as per W3C standard) and it works in both IE and Firefox.

    <input type="submit" value="" style="border-style: none; background: url('images/searchbutton2.gif') no-repeat; width: 24px; height: 20px;" onmouseover="this.style.cursor= 'pointer'">

    Leave a comment:


  • Ray
    replied
    Try placing the onmouseover attribute on the actual input tag instead.

    In other words:

    <input type="submit" value="" style="border-style: none; background: url('images/searchbutton2.gif') no-repeat; width: 24px; height: 20px;" onmouseover="this.style.cursor= 'hand'">

    Leave a comment:


  • David
    replied
    I would think using a hand icon would be counter intuitive (or do you mean the hand with a finger pointer). A hand normally implies the ability to drag or grab the item, not click on it.

    Further, most browsers automatically change the pointer when you mouse over a link, or button.

    I have never attempted this in Javscript, so I don't know what is wrong with your code.

    Leave a comment:


  • naartjie
    started a topic html search box and onmouseover

    html search box and onmouseover

    hello,
    i'd like to have the mouse pointer change to a hand when it hovers over the search button of the html search box. i tried this with no luck:

    <span onmouseover="this.style.cursor= 'hand'"><input type="submit" value="" style="border-style: none; background: url('images/searchbutton2.gif') no-repeat; width: 24px; height: 20px;"></span>

    i know this should be simple but i can't get it to work

    thanks.
Working...