Replacing text with mouseover?

E

Ed Jay

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)
 
E

Ed Jay

Ed Jay said:
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)
 
N

Neredbojias

With neither quill nor qualm, Ed Jay quothed:
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".
 
E

Ed Jay

Toby Inkster said:
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)
 
E

Ed Jay

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)
 
N

Neredbojias

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.'"'
 
E

Ed Jay

Neredbojias said:
With neither quill nor qualm, Ed Jay quothed:


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)
 
E

Ed Jay

Mark Parnell 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. 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)
 
B

Beauregard T. Shagnasty

Ed 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. 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...
 
M

Mark Parnell

Previously in alt.html 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).
 
R

rf

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.
 
M

Mark Parnell

Previously in alt.html 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? :)
 
B

Beauregard T. Shagnasty

rf 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.

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...)
 
R

rf

Mark said:
Previously in alt.html 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.
 
R

rf

Beauregard T. Shagnasty wrote
rf 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.

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.
 
B

Beauregard T. Shagnasty

rf said:
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?
 
L

Leonard Blaisdell

Beauregard T. Shagnasty said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top