Can this be done in HTML

T

Tora

I have a table with 2 rows and 3 columns
The table has 5 pictures in it (1 big, 4 small)

r1c1 : big
r1c2 : small 1
r1c3 : small 2
r2c1 : spanned for big picture
r2c2 : small 3
r2c3 : small 4

When i click on one of the small pictures i want it to switch place with the
big picture.

Can this be done in html (without creating 5 different pages) or do i need
to learn a script language to write this ?

Someone has done this before ?

Would it be easier to just show 5 small pictures and open a new window when
one is clicked on ?


Tia
 
A

andy johnson

When i click on one of the small pictures i want it to switch place with the
big picture.

Can this be done in html (without creating 5 different pages) or do i need
to learn a script language to write this ?

Someone has done this before ?

Would it be easier to just show 5 small pictures and open a new window when
one is clicked on ?


Tia
There are plenty of ready to use scripts, with no learning curve.
Google for "javascript image rollovers" or "javascript image swap".
IIRC, the RxCx image filenames are a Front Page thing. You should
really dump Front Page and get a good html editor. You can see what I
mean by Googling "bad frontpage". While you are at it, try to do the
layout with CSS. You can Google "tables for layout" and CSS P" It's
really easy, and easier in the long run when you maintenance the page.


-
Andy

"There would be a lot more civility in this world if people
didn't take that as an invitation to walk all over you"
- (Calvin and Hobbes)
 
R

Richard

Tora wrote:>>
I have a table with 2 rows and 3 columns
The table has 5 pictures in it (1 big, 4 small)
r1c1 : big
r1c2 : small 1
r1c3 : small 2
r2c1 : spanned for big picture
r2c2 : small 3
r2c3 : small 4
When i click on one of the small pictures i want it to switch place with
the big picture.
Can this be done in html (without creating 5 different pages) or do i
need to learn a script language to write this ?
Someone has done this before ?
Would it be easier to just show 5 small pictures and open a new window
when one is clicked on ?

Tia

I use the script below on my play toy site. Sweet and simple.
[1] is the main image, [2 and up] are the swap images.
to see it at work: www.1-large-world.com/stargate/map1.html
move mouse over the red chevrons to swap.

<SCRIPT LANGUAGE="JavaScript" type="text/javascript">

<!-- JavaScript by web-architect copyright © 2000, web-architect.
if(document.images) {
pics = new Array();
pics[1] = new Image();
pics[1].src = "b-1.jpg";
pics[2] = new Image();
pics[2].src = "cm1.jpg";
pics[3] = new Image();
pics[3].src = "a.jpg";
pics[4] = new Image();
pics[4].src = "f.jpg";
pics[5] = new Image();

}

function changer(from,to) {
if(document.images) {
document.images[from].src = pics[to].src;
}
}
//-->
</SCRIPT>
 
M

Mark Parnell

Tora said:
I have a table with 2 rows and 3 columns
The table has 5 pictures in it (1 big, 4 small)

When i click on one of the small pictures i want it to switch place
with the big picture.

Can this be done in html (without creating 5 different pages) or do i
need to learn a script language to write this ?

Not in pure HTML, no. Best handled by a server-side scripting language,
such as PHP or ASP (depending on what you have available). It can be done
in Javascript (as others have mentioned), but this won't work for users with
Javascript unavailable/disabled.
Someone has done this before ?

Of course. Brucie did a nice one with his butterflies in PHP, but he has
since taken it down. :-(
Would it be easier to just show 5 small pictures and open a new
window when one is clicked on ?

No. Please don't open new windows.
 

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,777
Messages
2,569,604
Members
45,224
Latest member
BettieToom

Latest Threads

Top