Can anyone help me?

J

J. Nielsen

I'm not a programmer and I don't have the time and energy to start learning
right now So I need some help.

Let's say I have made an HTML Table (consisting of three columns and six
rows). In each cell, in the first column I have put in an image (six
different ones).
In the second column I have merged all six cells into one cell and there put
in an image matching the background colour.
In the right column I have again put in six different pictures, one in each
cell.

What I now want is, when I MouseOver the first top-left picture the middle
image shall change into another as well as the top right image shall change.
When I remove the pointer from the image both the changed images shall turn
back again.

When I MouseOver the second-left picture, again the middle image shall
change as well as the second-right picture, and so on and so on.

Can anyone help me?


Jannick.
 
J

J. Nielsen

How much does the job pay?

Yeah, that's a good question!
This is actually an idea I got from another web site with some
modifications. Unfortunately that site no longer excists, .
The guy (a Norwegian) who made the web site once promised me to show me how
he had done this. I don't know what happened to him. Can't get in contact
with him anymore.

It is a simple "image change" script (as far as I understand). I tried to
sit down and make it myself, but I only got the "MouseOver-image" to change.
I thought that some might have done this before and had the script lying
around somewhere.

Jannick.
 
R

Richard Cornford

mscir wrote:
var imgsrc = new Array();
imgsrc[1]=new Array();
imgsrc[1][0]='art_1.jpg';
imgsrc[1][1]='amber_sm_3.jpg';
imgsrc[2]=new Array();
imgsrc[2][0]='art_2.jpg';
imgsrc[2][1]='amber_sm_4.jpg';
<snip>

You really should become familiar with writing Array literals, which can
appear in array literals, producing as near to multi-dimensional arrays
as javascript gets:-

var imgsrc = [
[
'art_1.jpg',
'amber_sm_3.jpg'
],
[
'art_2.jpg',
'amber_sm_4.jpg'
]
];

Richard.
 
K

kaeli

It is a simple "image change" script (as far as I understand). I tried to
sit down and make it myself, but I only got the "MouseOver-image" to change.
I thought that some might have done this before and had the script lying
around somewhere.



If all you need is the image swap function, search the archives.
There's tons.

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8
&q=image+swap&btnG=Search&meta=group%3Dcomp.lang.javascript

Also, dynamic drive probably has some canned ones.
http://www.dynamicdrive.com

--
 

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

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top