Showing hidden answer when question clicked?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John

    #31
    Re: Showing hidden answer when question clicked?

    Nigel,

    It won't work for ALL your visitors, but for people who have browsers
    that display the ALT text when you move over an image, you could try
    the ALT= tag for an image.

    <a href="answerURL " target="new"><i mg src="answer.gif " height="20"
    width="48" alt="The first letter of the alphabet is A" border="0"></a>

    You would want to have the answer available at the "answerURL" address
    in case the user has a browser that does not display the ALT image. The
    top of your page could tell the user to move their mouse over the word
    "Answer" to see the answer, and add (if you don't see the answer, click
    there).

    Since you'd re-use the "answer.gif " every place you need it, the image
    wouldn't add lots of code to your page.

    I'm sure there are many other methods you can use to accomplish your
    purpose, like using OnMouseOver or OnClick.

    Look at http://www.godloveseveryone.org/

    Move your mouse over the "Get Out of Hell Free" card and you'll see an
    ALT message (if you are using a compatible browser), and if you click
    the image, you get an Alert message, if Javascript is active. (Just
    now, I saw the ALT text on IE but not on MF, but I did see the alert
    message on both.)

    If you have puzzle-lovers in your family, be sure to download mazes
    that contain their first names. See my signature. And if you're going
    to make a purchase from Amazon anyway, see my postscript to see how to
    help us at no cost to you.

    John
    www.GodLovesEveryone.org ("God Loves yourname" maze)
    www.MAZES.com/readers/maze.asp ("yourname is an amazing reader" maze)

    P.S. If you shop at Amazon, please use our links to get there:

    thanks in advance

    Comment

    • Els

      #32
      Re: Showing hidden answer when question clicked?

      John wrote:
      [color=blue]
      > It won't work for ALL your visitors, but for people who have browsers
      > that display the ALT text when you move over an image, you could try
      > the ALT= tag for an image.[/color]

      That's not what alt text is for. IE uses it when the appropriate title
      attribute is missing. To have a tooltip on all graphical browsers, use
      title, not alt. The alt attribute is to be added on /all/ images, but
      is for display if for whatever reason the image cannot be displayed.
      (leave it empty on purely decorative images, as the alt text wouldn't
      add any value there)

      --
      Els http://locusmeus.com/
      Sonhos vem. Sonhos vão. O resto é imperfeito.
      - Renato Russo -
      Now playing: New Adventures - Come On

      Comment

      • John

        #33
        Re: Showing hidden answer when question clicked?

        Thanks, Els,

        Using "Title=" instead of "Alt=" means that Mozilla Firefox now
        displays part of the title text when I move the mouse over the image.

        Interestingly, though, Firefox only displays one line (19 words) of the
        title text, while MIE displays it as a paragraph.

        In any case, it is an HTML only method of displaying short answers that
        the original questioner asked about. I went ahead and created a small
        page illustrating my very simple method:

        Look here: http://www.mazes.com/testing/q-and-a.htm

        Hope this is helpful to a few people. (I know it is much simpler than
        most people in this group use).

        John
        Please use our link when you visit Amazon.com


        Comment

        • Els

          #34
          Re: Showing hidden answer when question clicked?

          John wrote:
          [color=blue]
          > Thanks, Els,
          >
          > Using "Title=" instead of "Alt=" means that Mozilla Firefox now
          > displays part of the title text when I move the mouse over the image.
          >
          > Interestingly, though, Firefox only displays one line (19 words) of the
          > title text, while MIE displays it as a paragraph.
          >
          > In any case, it is an HTML only method of displaying short answers that
          > the original questioner asked about.[/color]

          IIRC, a tooltip also isn't displayed long enough to be read properly
          by everyone, and it's also a rather small font type. So, even though
          it seems to be an HTML way, it isn't really. I mean - it's HTML
          alright, but it's not a good method of displaying short answers. IMO a
          tooltip needs to be only an extra. Not something one should have to
          count on.
          [color=blue]
          > I went ahead and created a small
          > page illustrating my very simple method:
          >
          > Look here: http://www.mazes.com/testing/q-and-a.htm[/color]

          <whisper>Psss t! You forgot the alt attribute on the images!</> ;-)
          [color=blue]
          > Hope this is helpful to a few people. (I know it is much simpler than
          > most people in this group use).[/color]

          The tooltip could be done in pure CSS, which would provide a larger
          font, a larger box, and it stays as long as the mouse is hovering over
          the image, but it still wouldn't be a real solution, as not
          everybody's browser will display it, and the answer to the question is
          not exactly something I'd call a 'nice to have' on the site :-)

          --
          Els http://locusmeus.com/
          Sonhos vem. Sonhos vão. O resto é imperfeito.
          - Renato Russo -

          Comment

          Working...