Loading ...
Sorry, an error occurred while loading the content.

Re: [NH] Popup Display in MSIE and Firefox

Expand Messages
  • Lee Underwood
    If you use the following, it will open in all browsers and, if JavaScript is turned-off, it will function as a regular link.
    Message 1 of 8 , Jun 13, 2006
    • 0 Attachment
      If you use the following, it will open in all browsers and, if
      JavaScript is turned-off, it will function as a regular link.

      <!-- STEP ONE: Paste this code into the HEAD of your HTML document or
      an external file -->

      <script type="text/javascript">
      <!-- Begin
      /* This script and many more are available free online at
      The JavaScript Source!! http://javascript.internet.com
      Created by: Jeremy Keith :: http://www.adactio.com/ */

      function doPopups() {
      if (!document.getElementsByTagName) return false;
      var links=document.getElementsByTagName("a");
      for (var i=0; i < links.length; i++) {
      if (links[i].className.match("popup")) {
      links[i].onclick=function() {
      // Below - to open a full-sized window, just use:
      window.open(this.href);
      window.open(this.href, "",
      "top=40,left=40,width=600,height=400,scrollbars");
      return false;
      }
      }
      }
      }
      window.onload=doPopups;
      // End -->
      </script>


      <!-- STEP TWO: Copy this code into the BODY of your HTML document -->

      <BODY>

      <div align="center">
      <!-- Add the class attribute to your links as below -->
      <a href="http://javascript.internet.com/" class="popup">JavaScript
      Source</a><br>
      <a href="http://www.scriptsearch.com/" class="popup">Script Search</a><br>
      <a href="http://www.webreference.com/" class="popup">Web Reference</a>
      </div>


      You can also find it here:
      http://javascript.internet.com/navigation/popup-function.html

      Hope that helps. (if it doesn't display, let me know.) If not, let me
      know, I have one or two others.

      Lee





      On 6/13/2006 04:31 PM, Ray Shapp wrote:
      ........................................................

      >Hello Group,
      >
      >How to provide popup text to display in both MSIE and Firefox?
      >
      >For displaying popup text in MSIE, the "alt" tag works fine. For example, the
      >following HTML works as expected in MSIE:
      >
      > <img src="gifs/astrline.gif" alt="Drawing of Observatory"
      > width="460" height="42">
      >
      >This popup info is invisible to Firefox.
      >
      >On the other hand, in an XML file, the following displays the popup info in
      >Firefox, but not in MSIE:
      >
      > <a href="_FAQ.html.en"><abbr title="frequently asked
      > questions">FAQ</abbr></a>
      >
      >Does anyone know of a workaround to cause the same popup info to display in
      >both browsers?
      >
      >Thanks for the help.
      >
      >Ray Shapp
      >
      >
      >
      >
      >
      >CSE HTML Validator Lite - it's free:
      >http://home.earthlink.net/~5wink/dl/cselite652.exe
      >
      >Fookes Software Home: http://www.fookes.us/redir
      >
      >Yahoo! Groups Links
      >
      >
      >
      >
      >
      >
      >
      >
      >--
      >No virus found in this incoming message.
      >Checked by AVG Anti-Virus.
      >Version: 7.1.394 / Virus Database: 268.8.3/362 - Release Date: 6/12/2006
      ........................................................


      --
      No virus found in this outgoing message.
      Checked by AVG Anti-Virus.
      Version: 7.1.394 / Virus Database: 268.8.3/362 - Release Date: 6/12/2006
    • Marcelo de Castro Bastos
      On the last exciting episode, aired on 13/6/2006 17:31, Ray Shapp ... In my experience, title should work in all modern browsers in the most common cases,
      Message 2 of 8 , Jun 13, 2006
      • 0 Attachment
        On the last exciting episode, aired on 13/6/2006 17:31, Ray Shapp
        invited the wrath of the gods by saying:
        > How to provide popup text to display in both MSIE and Firefox?
        >
        > For displaying popup text in MSIE, the "alt" tag works fine. For example, the
        > following HTML works as expected in MSIE:
        >
        > <img src="gifs/astrline.gif" alt="Drawing of Observatory"
        > width="460" height="42">
        >
        > This popup info is invisible to Firefox.
        >
        > On the other hand, in an XML file, the following displays the popup info in
        > Firefox, but not in MSIE:
        >
        > <a href="_FAQ.html.en"><abbr title="frequently asked
        > questions">FAQ</abbr></a>
        >
        > Does anyone know of a workaround to cause the same popup info to display in
        > both browsers?
        >
        In my experience, "title" should work in all modern browsers in the most
        common cases, such as images. In fact, the use of "alt" for popups is
        discouraged; "alt" is intended for text to be displayed INSTEAD of the
        image, either for blind users or if the image cannot be loaded for some
        reason. Any reasonably current browser should support "title" for text
        pop-ups in images, and the better ones will support it in many other
        elements.

        In the particular case you described above, I think the problem is
        caused by the "title" being used in the <abbr> tag. If you place it like
        this:

        <a href="_FAQ.html.en" title="frequently asked questions">FAQ</a>

        it should work as intended -- probably a bug in MSIE, since "title"
        should work in just about ANY element.

        Marcelo Bastos
      • loro
        ... title is what you should use. IE supports title - but it doesn t support ABBR. Sigh. One somewhat ugly solution is to nest a SPAN inside the the ABBR and
        Message 3 of 8 , Jun 13, 2006
        • 0 Attachment
          Ray Shapp wrote:
          >How to provide popup text to display in both MSIE and Firefox?
          >
          >For displaying popup text in MSIE, the "alt" tag works fine. For example, the
          >following HTML works as expected in MSIE:
          >
          > <img src="gifs/astrline.gif" alt="Drawing of Observatory"
          > width="460" height="42">
          >
          >This popup info is invisible to Firefox.
          >
          >On the other hand, in an XML file, the following displays the popup info in
          >Firefox, but not in MSIE:
          >
          > <a href="_FAQ.html.en"><abbr title="frequently asked
          > questions">FAQ</abbr></a>
          >
          >Does anyone know of a workaround to cause the same popup info to display in
          >both browsers?

          "title" is what you should use. IE supports title - but it doesn't support
          ABBR. Sigh. One somewhat ugly solution is to nest a SPAN inside the the
          ABBR and use title on that too. You can do that with JS if you prefer.
          <http://www.sovavsiti.cz/css/abbr.html>

          But I think your problem wasn't with ABBR but more general. Then title
          works fine.

          Lotta
        • Ray Shapp
          Hello Lee, Marco, and Lotta, Thanks for the help. I ll be using title for pop-ups because I m sure some of our users have JavaScript disabled. I am glad to
          Message 4 of 8 , Jun 14, 2006
          • 0 Attachment
            Hello Lee, Marco, and Lotta,

            Thanks for the help. I'll be using "title" for pop-ups because I'm sure some
            of our users have JavaScript disabled. I am glad to know about the JavaScript
            Source site, however, because I want to learn how to write JS.

            Best regards,

            Ray Shapp
          • Lee Underwood
            Ray, If you re interested in learning JavaScript, I might recommend my series The JavaScript Diaries , located at:
            Message 5 of 8 , Jun 14, 2006
            • 0 Attachment
              Ray,

              If you're interested in learning JavaScript, I might recommend my
              series "The JavaScript Diaries", located at:
              http://www.webreference.com/programming/javascript/diaries/

              (sorry, shameless plug)

              Lee


              On 6/14/2006 03:36 PM, Ray Shapp wrote:
              ........................................................

              >Hello Lee, Marco, and Lotta,
              >
              >Thanks for the help. I'll be using "title" for pop-ups because I'm sure some
              >of our users have JavaScript disabled. I am glad to know about the JavaScript
              >Source site, however, because I want to learn how to write JS.
              >
              >Best regards,
              >
              >Ray Shapp
              >
              >
              >
              >
              >
              >CSE HTML Validator Lite - it's free:
              >http://home.earthlink.net/~5wink/dl/cselite652.exe
              >
              >Fookes Software Home: http://www.fookes.us/redir
              >
              >Yahoo! Groups Links
              >
              >
              >
              >
              >
              >
              >
              >
              >--
              >No virus found in this incoming message.
              >Checked by AVG Anti-Virus.
              >Version: 7.1.394 / Virus Database: 268.8.4/363 - Release Date: 6/13/2006
              ........................................................


              --
              No virus found in this outgoing message.
              Checked by AVG Anti-Virus.
              Version: 7.1.394 / Virus Database: 268.8.4/363 - Release Date: 6/13/2006
            • Ray Shapp
              Hi Lee, Yes, that is the site I was referring to when I said thanks for the reference. It looks very
              Message 6 of 8 , Jun 15, 2006
              • 0 Attachment
                Hi Lee,

                <<I might recommend my series "The JavaScript Diaries", >>

                Yes, that is the site I was referring to when I said thanks for the reference.
                It looks very useful.

                Thanks for the reply.

                Ray Shapp
              • bruce.somers@web.de
                Those are not popups. They are called Tool Tips. Bruce
                Message 7 of 8 , Jun 15, 2006
                • 0 Attachment
                  Those are not popups. They are called Tool Tips.

                  Bruce

                  > Hello Group,
                  >
                  > How to provide popup text to display in both MSIE and Firefox?
                  >
                  > For displaying popup text in MSIE, the "alt" tag works fine. For example, the
                  > following HTML works as expected in MSIE:
                  >
                  > <img src="gifs/astrline.gif" alt="Drawing of Observatory"
                  > width="460" height="42">
                  >
                  > This popup info is invisible to Firefox.
                  >
                  > On the other hand, in an XML file, the following displays the popup info in
                  > Firefox, but not in MSIE:
                  >
                  > <a href="_FAQ.html.en"><abbr title="frequently asked
                  > questions">FAQ</abbr></a>
                  >
                  > Does anyone know of a workaround to cause the same popup info to display in
                  > both browsers?
                  >
                  > Thanks for the help.
                  >
                  > Ray Shapp
                Your message has been successfully submitted and would be delivered to recipients shortly.