Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

list for big pic. page

Status
Not open for further replies.

Zas

Programmer
Oct 4, 2002
211
US
I didn't want to put pictures on a different page, because thats tedious clicking 'back' and finding which one you'd like to see. I'd like to know howto make a list of categories (ohio, texas, friends, trips) and then have each array of pictures open up in a seperate table, whenever an item from the list is clicked, and the previous one is replaced by the new one. This is so people with slower computers aren't forced to load tons of images at once.

Happieness is like peeing your pants.
Everyone can see it, but only you can feel the warmth.
 
In a nutshell I want an expandable and closable list for each link.

Happieness is like peeing your pants.
Everyone can see it, but only you can feel the warmth.
 
Something like this? I've not tested it so fingers crossed...

Code:
<a href="javascript:sel('group1')">Selection One</a>
<a href="javascript:sel('group2')">Selection Two</a>

<div id="yourSelection"></div>

<script>
var display;
var group1 = new Array('image.gif','image.png','image.jpg');
var group2 = new Array('image.gif','image.png','image.jpg');

function sel(input){

input = eval(input);
display = '<table><tr>';

for (var i=0;i!=input.length;i++) display += '<td><img src="'+input[i]+'"></td>';

display += '</tr></table>';

document.getElementById('yourSelection').innerHTML= display;

}
</script>

----------
I'm willing to trade custom scripts for... [see profile]
 
stormbind,

how in the world did you get your post to look like that?

=========================================================
-jeff
try { succeed(); } catch(E) { tryAgain(); }
 
thanks.. now to change it so it works with tables and such :p

Happieness is like peeing your pants.
Everyone can see it, but only you can feel the warmth.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top