onMouseOver event - Question

F

Frank Wood

Hi, I am cross posting this because I'm not really sure which area (HTML/DHTML,
Javascript, CSS, etc.) I need to post this question in. I'm also fairly new to
all this - please bare with me.

I have a table with two columns and two rows in it. In the upper left corner, I
have a logo image for my company. In the top right column/cell, I have some
navigational stuff, no big deal. In the left cell in the 2nd row, I have a list
of anchors of different songs I am producing - something like this:

<A HREF="jamison.mp3">Jamison</A>
<A HREF="tlw.mp3">The Long Winter</A>
<A HREF="summer.mp3">It's Summertime</A>
....
....

The cell on the right, 2nd row is empty at the start.

On the 2nd row, 1st cell, where the anchors are, on a "mouse over" event, I'd
like to display song lyrics and information regarding the song in the right
cell, 2nd row as the user moves the mouse over a given anchor.

What is the best way for me to do this? There are a couple of things/issues I
can think of right away:

1) Let's say there are 20 anchors in the left column. Let's say that some of
the songs' lyrics are quite lengthy and extend past the height of the cell at
row 2, left column. How would the system know this in advance (this will make
more sense with question #2 below)? Perhaps tell it some type of maximum height
you know will never be reached or something?

2) To me it doesn't make a lot of sense to include all this text in the main
HTML file since a majority of the time, the user(s) will never move their mouse
across ALL the anchors, only one or two. Seems to me there should be some way
of "loading" them as soon as the mouse over event occurs.

Any help with this would be appreciated. To respond via email, please remove
the NOSPAM literal from my address.

thanks,
Frank Wood
 
N

Nobody

| Hi, I am cross posting this because I'm not really sure which area
(HTML/DHTML,
| Javascript, CSS, etc.) I need to post this question in. I'm also fairly
new to
| all this - please bare with me.
|

Er. Okay.

| I have a table with two columns and two rows in it. In the upper left
corner, I
| have a logo image for my company. In the top right column/cell, I have
some
| navigational stuff, no big deal. In the left cell in the 2nd row, I have a
list
| of anchors of different songs I am producing - something like this:
|
| <A HREF="jamison.mp3">Jamison</A>
| <A HREF="tlw.mp3">The Long Winter</A>
| <A HREF="summer.mp3">It's Summertime</A>
| ...
| ...
|
| The cell on the right, 2nd row is empty at the start.
|

Okay.

| On the 2nd row, 1st cell, where the anchors are, on a "mouse over" event,
I'd
| like to display song lyrics and information regarding the song in the
right
| cell, 2nd row as the user moves the mouse over a given anchor.

Why not just put this information in the title attribute of the links? You
could then optionally change the innerHTML or innerText property of the
bottom right cell to the title text (use the onmouseover and onmouseout
events of the anchor element.)

|
| What is the best way for me to do this? There are a couple of
things/issues I
| can think of right away:
|
| 1) Let's say there are 20 anchors in the left column. Let's say that some
of
| the songs' lyrics are quite lengthy and extend past the height of the cell
at
| row 2, left column. How would the system know this in advance (this will
make

Rows are all the same height in the scenario described above. The second
row would adjust accordingly to fit the new text.

| more sense with question #2 below)? Perhaps tell it some type of maximum
height
| you know will never be reached or something?
|
| 2) To me it doesn't make a lot of sense to include all this text in the
main
| HTML file since a majority of the time, the user(s) will never move their
mouse
| across ALL the anchors, only one or two. Seems to me there should be some
way
| of "loading" them as soon as the mouse over event occurs.

Don't bother with this unless the extra text is massive in length. If it
is, clip it and have a link to the rest.
 

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,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top