Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Button Image Disappears onmouseout?

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using the following code-

<a style="align: center; border-style: none;" href="http://"; style="color: #000000"
<img src="http:/image_a.png" id="pic1">Event</a>

Unfortunately, my image button disappears after it is clicked (or pressed in a mobile setting) and as the new page is loading. I'm not sure what I may be missing here. Thank you for any ideas on this.

- David
Posts: 297
Android Firefox Browser Fedora
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why are you messing around with onmouseover and onmouseout at all instead of just using CSS :hover?

To answer your question: you probably have an issue that the mouseover and mouseout events will fire as the mouse pointer enters and leaves the image element as well as when it enters and leaves the anchor (because of event bubbling), you don't seem to have accounted for this at all.
Hot dog! An advertiser loves us THIS much:
the value of filler advertising in 2020
    Bookmark Topic Watch Topic
  • New Topic