How to open a box during a mouseover on an image

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • yiskas
    New Member
    • Aug 2011
    • 11

    How to open a box during a mouseover on an image

    I have an icon image of "?" that gets information about the field it belongs. I want the image to open a box like a balloon pop-up while the cursor is hovering over it(hovering over the image).

    I wrote this:
    Code:
    <div class="formInfo">
      <a href="ajax.htm?width=375">
        <img src="http://bytes.com/images/question_icon.jpg" width="19" height="18">
      </a>
    </div>
    In the cshtml file.
    And I have an Ajax file that defines what is in the box.
    But - it dosn't work.
    Do i need something else?
    Last edited by Frinavale; Aug 25 '11, 08:50 PM. Reason: Fixed spelling and grammar errors. Formatted the HTML so that it is more legible.
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    You have nothing defined for onmouseover. And that's a javascript event. You could also use the anchor's hover pseudo-element to do it in CSS.
    Last edited by Frinavale; Aug 25 '11, 08:53 PM. Reason: Removed part of response pertaining where this question-thread belongs.

    Comment

    • yiskas
      New Member
      • Aug 2011
      • 11

      #3
      I managed already. I used the hover event in CSS like you suggested. Thank you anyway.

      Comment

      • Frinavale
        Recognized Expert Expert
        • Oct 2006
        • 9749

        #4
        You're missing a closing tag for the image in the code you posted.

        Also, I don't see any section for the "info" that you want to display.
        Last edited by Frinavale; Aug 25 '11, 09:03 PM.

        Comment

        • yiskas
          New Member
          • Aug 2011
          • 11

          #5
          You don't need closing tags for images

          Comment

          Working...