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

text rollover

Expand Messages
  • Steven Downs
    hello all, i m looking for a non-image rollover, one that will position text in a blank space on the screen when i rollover a text link. is this possible?
    Message 1 of 4 , Sep 7, 2001
      hello all,

      i'm looking for a non-image rollover, one that will position text in a blank
      space on the screen when i rollover a text link. is this possible?

      thanks!

      _________________________________________________________________
      Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
    • Don Arnett
      Do you mean when you move the cursor over a link, that some text appears else where on the screen? Will it be the same text for a given link every time?
      Message 2 of 4 , Sep 7, 2001
        Do you mean when you move the cursor over a link, that some text appears
        else where on the
        screen?

        Will it be the same text for a given link every time?

        Depending on the details of what you want to do, it should be possible in IE
        4+ and NS 6 and maybe in NS 4.

        I'll see if I can whip up a little demo of what I'm thinking that you're
        looking for.

        -----Original Message-----
        From: Steven Downs [mailto:dielikadog@...]
        Sent: Friday, September 07, 2001 2:33 PM
        To: 123javascripts@yahoogroups.com
        Subject: [123javascripts] text rollover


        hello all,

        i'm looking for a non-image rollover, one that will position text in a blank

        space on the screen when i rollover a text link. is this possible?

        thanks!

        _________________________________________________________________
        Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp






        Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
      • Don Arnett
        A simple example that works on only in IE http://don.arnett.ws/jsexamples/textRollover.html Note that the message disappears only because I program it to with
        Message 3 of 4 , Sep 7, 2001
          A simple example that works on only in IE
          http://don.arnett.ws/jsexamples/textRollover.html

          Note that the message disappears only because I program it to with the
          onMouseOut. If you remove the onMouseOut, the last displayed message would
          remain up.

          Also, you can change the position of the message by changing the top and
          left values in the DIV definition. I'm pretty sure that you could make the
          message move on the page by changing the top and left values in Javascript
          (textDIV.style.left=???).

          -----Original Message-----
          From: Steven Downs [mailto:dielikadog@...]
          Sent: Friday, September 07, 2001 2:33 PM
          To: 123javascripts@yahoogroups.com
          Subject: [123javascripts] text rollover


          hello all,

          i'm looking for a non-image rollover, one that will position text in a blank

          space on the screen when i rollover a text link. is this possible?

          thanks!

          _________________________________________________________________
          Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp






          Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
        • Don Arnett
          I have another example that works in both IE and NS 4. http://don.arnett.ws/jsexamples/textRollover2.html In the previous version (textRollover.html), you
          Message 4 of 4 , Sep 7, 2001
            I have another example that works in both IE and NS 4.
            http://don.arnett.ws/jsexamples/textRollover2.html

            In the previous version (textRollover.html), you changed the text by
            changing the contents of the DIVs innerHTML attribute. But NS 4 doesn't
            support this. With the previous version, you could make the text be
            different every time you did a rollover by just outputting different text.

            But NS doesn't do this (to the best of my knowledge). But, if you want to
            display text for each link and the text for each link is the same each time,
            you can do that by defining a different DIV for each link and then making
            them invisible except when you want them.

            Normally, you use DIVs in IE and LAYERs in Netscape to do this stuff. But
            someone pointed me to an article that described this method as preferred.
            Apparently, it is the now 'preferred' method because NS treats a DIV defined
            in this manner as a layer, so you don't have to mix LAYERs and DIVs in your
            HTML. But you still have to use the LAYERs in the javascript. So anywho,
            this is how I've avoided learning LAYERs up to this point.

            So, first you'll note the inclusion of a JS Script file names
            "../common/js/ua.js". I downloaded this from
            http://developer.netscape.com/evangelism/tools/practical-browser-sniffing/#s
            ource and use it to determine which browser that I'm in (navigator.family).

            Skip to the bottom of the HTML and you'll see three DIVs defined, one for
            each link. I didn't worry too much about their position on the page for
            this demo. You can adjust that by changing the top and left values. You
            can even adjust it while the page is displayed to make them animated. The
            part that says "position:relative;" means that the top and left values are
            relative to the codes position on the page. That is why the three DIVs
            don't appear on top of one another even tho they have the same top and left
            values. If you changed "position:relative;" to "position:absolute;", the
            top and left values would be relative to the top left corner of the screen.
            You can play with this.

            In the displayText() function, you'll see IFs like this:

            if (navigator.family == "nn4") {
            document.layers["div1"].visibility="show";
            } else {
            div1.style.visibility="visible";
            }

            First it detects whether you're using NS or IE. (This is coded so that if
            it is not NS 4, then it used the IE code, which really isn't right, but
            that's another subject). Then it sets the visibility to visible using the
            appropriate method. Note that the way of accessing the visibility attribute
            is different per browser and also the value assigned is different (show vs
            visible, and hide vs hidden).

            Finally, since when I defined the DIVs, I used NS accepted value 'hide' to
            set the visibility, the DIVs will initialize be displayed in IE. One way to
            get around this would be to use Javascript to set the value based upon the
            browser. But rather than do this, I just called displayText(0) with "BODY
            unload" and let it hide those DIVs.

            I'll put another version out in a bit that does the same as this version but
            the code is a little cleaner. I left this code as is so the it would be
            move obvious what it was doing. I won't send another email but look for
            don.arnett.ws/jsexamples/textRollover3.html

            PS I'm not proofreading this novel, so hopefully there aren't too many
            typos or skipped words and it all makes sense.



            -----Original Message-----
            From: Steven Downs [mailto:dielikadog@...]
            Sent: Friday, September 07, 2001 2:33 PM
            To: 123javascripts@yahoogroups.com
            Subject: [123javascripts] text rollover


            hello all,

            i'm looking for a non-image rollover, one that will position text in a blank

            space on the screen when i rollover a text link. is this possible?

            thanks!

            _________________________________________________________________
            Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp






            Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
          Your message has been successfully submitted and would be delivered to recipients shortly.