Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Replacing text with mouseover?

Reply
Thread Tools

Replacing text with mouseover?

 
 
Ed Jay
Guest
Posts: n/a
 
      08-23-2005
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)
 
Reply With Quote
 
 
 
 
Ed Jay
Guest
Posts: n/a
 
      08-23-2005
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)
 
Reply With Quote
 
 
 
 
Toby Inkster
Guest
Posts: n/a
 
      08-23-2005
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

 
Reply With Quote
 
Neredbojias
Guest
Posts: n/a
 
      08-23-2005
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.
 
Reply With Quote
 
Ed Jay
Guest
Posts: n/a
 
      08-23-2005
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)
 
Reply With Quote
 
Ed Jay
Guest
Posts: n/a
 
      08-23-2005
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)
 
Reply With Quote
 
Ed Jay
Guest
Posts: n/a
 
      08-23-2005
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)
 
Reply With Quote
 
Neredbojias
Guest
Posts: n/a
 
      08-23-2005
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="A ES does *not* stand
for 'Ants Eat ****.'"'

--
Neredbojias
Contrary to popular belief, it is believable.
 
Reply With Quote
 
Ed Jay
Guest
Posts: n/a
 
      08-23-2005
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="A ES does *not* stand
>for 'Ants Eat ****.'"'


Thank you very much.

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

Ed Jay (remove M to respond)
 
Reply With Quote
 
Mark Parnell
Guest
Posts: n/a
 
      08-24-2005
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

--
Mark Parnell
http://www.clarkecomputers.com.au
alt.html FAQ :: http://html-faq.com/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
regex for replacing plain text within html string... Tim_Mac ASP .Net 2 01-21-2006 12:13 AM
Replacing HTML text before rendering OB ASP .Net 1 12-02-2005 03:36 AM
Replacing the specific pattern of text in a huge text string.. Brown Smith ASP .Net 1 06-25-2005 05:34 AM
Replacing - and not Replacing... Rob Meade ASP General 5 04-11-2005 06:49 PM
Searching and replacing multiple strings in text Chris Java 5 10-11-2003 05:12 AM



Advertisments