Replacing text with mouseover?

Discussion in 'HTML' started by Ed Jay, Aug 23, 2005.

  1. Ed Jay

    Ed Jay Guest

    I currently change images using a mouseover script. The images contain
    small text squibs, so they aren't very large. I'd like to expand the
    amount of text, but I don't want to resort to large images to accomplish
    my goal. Is there some method for changing text using a mouseover function
    without increasing loading time?

    Ed Jay (remove M to respond)
    Ed Jay, Aug 23, 2005
    #1
    1. Advertising

  2. Ed Jay

    Ed Jay Guest

    Ed Jay <> wrote:

    >I currently change images using a mouseover script. The images contain
    >small text squibs, so they aren't very large. I'd like to expand the
    >amount of text, but I don't want to resort to large images to accomplish
    >my goal. Is there some method for changing text using a mouseover function
    >without increasing loading time?
    >

    Following up my own post...the answer is yes, by placing the different
    texts on their own layers and changing the z-index to selectively bring
    each layer to the top. My question then becomes, how do I change the
    z-index of each layer using a mouseover function?

    Ed Jay (remove M to respond)
    Ed Jay, Aug 23, 2005
    #2
    1. Advertising

  3. Ed Jay

    Toby Inkster Guest

    Ed Jay wrote:

    > how do I change the z-index of each layer using a mouseover function?


    onmouseover="this.style.zIndex+=100;"

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
    Toby Inkster, Aug 23, 2005
    #3
  4. Ed Jay

    Neredbojias Guest

    With neither quill nor qualm, Ed Jay quothed:

    > Ed Jay <> wrote:
    >
    > >I currently change images using a mouseover script. The images contain
    > >small text squibs, so they aren't very large. I'd like to expand the
    > >amount of text, but I don't want to resort to large images to accomplish
    > >my goal. Is there some method for changing text using a mouseover function
    > >without increasing loading time?
    > >

    > Following up my own post...the answer is yes, by placing the different
    > texts on their own layers and changing the z-index to selectively bring
    > each layer to the top.


    Nah. Better to use innerHTML.

    > My question then becomes, how do I change the
    > z-index of each layer using a mouseover function?
    >


    Basically by using onmouseover and getElementById. I think Toby posted
    a more specific example.

    > Ed Jay (remove M to respond)


    There's no "M" in "Ed Jay".

    --
    Neredbojias
    Contrary to popular belief, it is believable.
    Neredbojias, Aug 23, 2005
    #4
  5. Ed Jay

    Ed Jay Guest

    Toby Inkster <> wrote:

    >Ed Jay wrote:
    >
    >> how do I change the z-index of each layer using a mouseover function?

    >
    >onmouseover="this.style.zIndex+=100;"


    Thanks.

    I presume that each body of text is given its own style name?

    Ed Jay (remove M to respond)
    Ed Jay, Aug 23, 2005
    #5
  6. Ed Jay

    Ed Jay Guest

    Neredbojias <> wrote:

    >With neither quill nor qualm, Ed Jay quothed:
    >
    >> Ed Jay <> wrote:
    >>
    >> >I currently change images using a mouseover script. The images contain
    >> >small text squibs, so they aren't very large. I'd like to expand the
    >> >amount of text, but I don't want to resort to large images to accomplish
    >> >my goal. Is there some method for changing text using a mouseover function
    >> >without increasing loading time?
    >> >

    >> Following up my own post...the answer is yes, by placing the different
    >> texts on their own layers and changing the z-index to selectively bring
    >> each layer to the top.

    >
    >Nah. Better to use innerHTML.


    Thanks. That looks to work.
    >
    >> My question then becomes, how do I change the
    >> z-index of each layer using a mouseover function?
    >>

    >
    >Basically by using onmouseover and getElementById. I think Toby posted
    >a more specific example.
    >
    >> Ed Jay (remove M to respond)

    >
    >There's no "M" in "Ed Jay".


    email addy: <>

    Ed Jay (remove M to respond)
    Ed Jay, Aug 23, 2005
    #6
  7. Ed Jay

    Ed Jay Guest

    Thank you both Toby and Neredbojias for your suggestions. I tried both
    techniques and they worked fine for the case when one mouses over a text
    block. However, my situation is a bit more complicated for me.

    On the basis that one site example is worth a thousand attempts at
    explaining...

    Please go to my site <www.aes-intl.com>. Mouse over either the American or
    Japanese flag and you'll observe English or Japanese text, respectively,
    appearing below the AES logo. Below where the text (gif) appears is a
    larger block of text ("AES is a full-service investment..."). It is this
    block of text I wish to change when either flag is mouseover'ed.

    IOW, I want to change a 'remote' block of text with onmouseover and
    onmouseout. I'm stymied.

    Ed Jay (remove M to respond)
    Ed Jay, Aug 23, 2005
    #7
  8. Ed Jay

    Neredbojias Guest

    With neither quill nor qualm, Ed Jay quothed:

    > Thank you both Toby and Neredbojias for your suggestions. I tried both
    > techniques and they worked fine for the case when one mouses over a text
    > block. However, my situation is a bit more complicated for me.
    >
    > On the basis that one site example is worth a thousand attempts at
    > explaining...
    >
    > Please go to my site <www.aes-intl.com>. Mouse over either the American or
    > Japanese flag and you'll observe English or Japanese text, respectively,
    > appearing below the AES logo. Below where the text (gif) appears is a
    > larger block of text ("AES is a full-service investment..."). It is this
    > block of text I wish to change when either flag is mouseover'ed.
    >
    > IOW, I want to change a 'remote' block of text with onmouseover and
    > onmouseout. I'm stymied.
    >
    > Ed Jay (remove M to respond)


    1. ID the remote block of text.

    2. Create a function/2 functions called by your mouseover events (-
    instead of putting the js right in the "onmouseover" link if that's what
    you do now.)

    3. In the function(s), do the innerHTML thing to change the text in the
    ided larger block of text as well as whatever it is you do with the
    mouseovers now.

    Example:

    In the function(s) include:

    document.getElementById('lgtxtblock').innerHTML="AES does *not* stand
    for 'Ants Eat Shit.'"'

    --
    Neredbojias
    Contrary to popular belief, it is believable.
    Neredbojias, Aug 23, 2005
    #8
  9. Ed Jay

    Ed Jay Guest

    Neredbojias <> wrote:

    >With neither quill nor qualm, Ed Jay quothed:
    >
    >> Thank you both Toby and Neredbojias for your suggestions. I tried both
    >> techniques and they worked fine for the case when one mouses over a text
    >> block. However, my situation is a bit more complicated for me.
    >>
    >> On the basis that one site example is worth a thousand attempts at
    >> explaining...
    >>
    >> Please go to my site <www.aes-intl.com>. Mouse over either the American or
    >> Japanese flag and you'll observe English or Japanese text, respectively,
    >> appearing below the AES logo. Below where the text (gif) appears is a
    >> larger block of text ("AES is a full-service investment..."). It is this
    >> block of text I wish to change when either flag is mouseover'ed.
    >>
    >> IOW, I want to change a 'remote' block of text with onmouseover and
    >> onmouseout. I'm stymied.
    >>
    >> Ed Jay (remove M to respond)

    >
    >1. ID the remote block of text.
    >
    >2. Create a function/2 functions called by your mouseover events (-
    >instead of putting the js right in the "onmouseover" link if that's what
    >you do now.)
    >
    >3. In the function(s), do the innerHTML thing to change the text in the
    >ided larger block of text as well as whatever it is you do with the
    >mouseovers now.
    >
    >Example:
    >
    >In the function(s) include:
    >
    > document.getElementById('lgtxtblock').innerHTML="AES does *not* stand
    >for 'Ants Eat Shit.'"'


    Thank you very much.

    Who told you that's not what AES stands for? :)

    Ed Jay (remove M to respond)
    Ed Jay, Aug 23, 2005
    #9
  10. Ed Jay

    Mark Parnell Guest

    Mark Parnell, Aug 24, 2005
    #10
  11. Ed Jay

    Ed Jay Guest

    Mark Parnell <> wrote:

    >Previously in alt.html, Ed Jay <> said:
    >
    >> Mouse over either the American or
    >> Japanese flag and you'll observe English or Japanese text, respectively,

    >
    >But I don't speak American.
    >http://www.cs.tut.fi/~jkorpela/flags.html


    Your point (and Jukka's) is well taken; however, the site is actually two
    sites in one. One is devoted to American investors and the other to
    Japanese businesses. They are not mirrors of each other. They each contain
    different content. Obviously, the American site should be in English and
    the Japanese site in Japanese. Wouldn't you agree?

    Ed Jay (remove M to respond)
    Ed Jay, Aug 24, 2005
    #11
  12. Ed Jay wrote:
    > Your point (and Jukka's) is well taken; however, the site is
    > actually two sites in one. One is devoted to American investors and
    > the other to Japanese businesses. They are not mirrors of each
    > other. They each contain different content.


    How about small country-shaped silhouettes?

    > Obviously, the American site should be in English and the Japanese
    > site in Japanese. Wouldn't you agree?


    Sounds logical...

    --
    -bts
    -This space intentionally left blank.
    Beauregard T. Shagnasty, Aug 24, 2005
    #12
  13. Ed Jay

    Mark Parnell Guest

    Previously in alt.html, Ed Jay <> said:

    > Your point (and Jukka's) is well taken; however, the site is actually two
    > sites in one. One is devoted to American investors and the other to
    > Japanese businesses.


    In your case, the use of flags is probably OK, since the site is aimed
    at people in a particular country - the language is simply a by-product
    of that.

    Though what happens if you have an American in Japan, or vice versa? ;-)

    > They are not mirrors of each other. They each contain
    > different content.


    I think Beauregard's suggestion of country silhouettes is a good idea.

    > Obviously, the American site should be in English and
    > the Japanese site in Japanese. Wouldn't you agree?


    Absolutely. But Jukka's point is that flags are inappropriate symbols to
    denote different languages, not that sites should only be in one
    language (actually, he has some good info on using different
    languages/character sets too IIRC).

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
    alt.html FAQ :: http://html-faq.com/
    Mark Parnell, Aug 24, 2005
    #13
  14. Ed Jay

    rf Guest

    Beauregard T. Shagnasty

    [flags,languages]

    > How about small country-shaped silhouettes?


    That assumes the viewer knows what their country looks like from the
    outside.

    Cheers
    Richard.
    rf, Aug 24, 2005
    #14
  15. Ed Jay

    Mark Parnell Guest

    Previously in alt.html, rf <@invalid.com> said:
    > Beauregard T. Shagnasty
    >
    > [flags,languages]
    >> How about small country-shaped silhouettes?

    >
    > That assumes the viewer knows what their country looks like from the
    > outside.


    True, but have you got a better suggestion? :)

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
    alt.html FAQ :: http://html-faq.com/
    Mark Parnell, Aug 24, 2005
    #15
  16. rf wrote:
    > Beauregard T. Shagnasty
    >
    > [flags,languages]
    >
    >> How about small country-shaped silhouettes?

    >
    > That assumes the viewer knows what their country looks like from
    > the outside.


    Y'know, I had actually typed an extra sentence asking if his clients
    were smart enough to know that ... but erased it because I didn't want
    to insult him. But hey, this is Usenet, right? :)

    "'MURRICANS, CLICK HERE!!!!11!!"

    (I'll guess the Japanese are smarter...)

    --
    -bts
    -This space intentionally left blank.
    Beauregard T. Shagnasty, Aug 24, 2005
    #16
  17. Ed Jay

    rf Guest

    Mark Parnell wrote:
    > Previously in alt.html, rf <@invalid.com> said:
    > > Beauregard T. Shagnasty
    > >
    > > [flags,languages]
    > >> How about small country-shaped silhouettes?

    > >
    > > That assumes the viewer knows what their country looks like from the
    > > outside.

    >
    > True, but have you got a better suggestion? :)


    Words.

    [in english with a western font]Go to the american investment site
    [in japanese with a japanese font]Go to the japanese business site

    This way I don't have to guess that rollowing over a flag or a picture of a
    country will do something (mystery meat navigation?).

    Cheers
    Richard.
    rf, Aug 24, 2005
    #17
  18. Ed Jay

    rf Guest

    Beauregard T. Shagnasty wrote
    > rf wrote:
    > > Beauregard T. Shagnasty
    > >
    > > [flags,languages]
    > >
    > >> How about small country-shaped silhouettes?

    > >
    > > That assumes the viewer knows what their country looks like from
    > > the outside.

    >
    > Y'know, I had actually typed an extra sentence asking if his clients
    > were smart enough to know that ... but erased it because I didn't want
    > to insult him. But hey, this is Usenet, right? :)
    >
    > "'MURRICANS, CLICK HERE!!!!11!!"


    I once found a concierge in a 5 star hotel in California who did not know
    what the international phone access code is [1]. He had *never* made a phone
    call to a number outside the U S of A. IIRC that was the same trip where
    some murrican asked me repeatedly which [US] state Sydney, Australia is in.

    [1] 001, I now have firmly remembered. At the time I could not recall if it
    was 001 or 011 or even (like in .au) 0011.

    > (I'll guess the Japanese are smarter...)


    We can hope :)

    Cheers
    Richard.
    rf, Aug 24, 2005
    #18
  19. rf wrote:
    > Beauregard T. Shagnasty wrote
    >>
    >> "'MURRICANS, CLICK HERE!!!!11!!"

    >
    > I once found a concierge in a 5 star hotel in California who did
    > not know what the international phone access code is [1]. He had
    > *never* made a phone call to a number outside the U S of A. IIRC
    > that was the same trip where some murrican asked me repeatedly
    > which [US] state Sydney, Australia is in.


    He is probably the brother of a woman I know who will tell you that
    north is the direction the car's hood is pointing. The reason is, if
    you unfold a map inside the car, north is at the top of the page and
    the hood is in that direction.

    But it's true. Most Murricans have never been out of the country; some
    fair number don't make it outside their home state during their lifetime.

    Isn't Sydney in Oregon?

    --
    -bts
    -This space intentionally left blank.
    Beauregard T. Shagnasty, Aug 24, 2005
    #19
  20. In article <lOSOe.8471$>,
    "Beauregard T. Shagnasty" <> wrote:

    > Isn't Sydney in Oregon?


    Perhaps in Oregon. For sure in Montana. I was there on a drive through
    thirty eight years ago. I bet it hasn't changed much. Well, except for
    the opera house ;-)

    leo

    --
    <http://web0.greatbasin.net/~leo/
    Leonard Blaisdell, Aug 24, 2005
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Morten
    Replies:
    2
    Views:
    698
    Morten
    Dec 19, 2003
  2. Brown Smith
    Replies:
    1
    Views:
    499
    Frankie
    Jun 25, 2005
  3. Tony
    Replies:
    3
    Views:
    88,328
    Richard
    Jan 17, 2004
  4. Doug
    Replies:
    4
    Views:
    42,765
    Toby Inkster
    Mar 13, 2006
  5. Rob Meade

    Replacing - and not Replacing...

    Rob Meade, Apr 5, 2005, in forum: ASP General
    Replies:
    5
    Views:
    274
    Chris Hohmann
    Apr 11, 2005
Loading...

Share This Page