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 sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error in photoalbum script

Status
Not open for further replies.

ImmAdmAn

Technical User
Sep 27, 2005
2
SE
Hi... I hope someone can help me before I get nuts.
Im making an "album" and the images should open up in a table when clicked but I can´t get it to work.

Any one who can give me a hint of whats wrond?
Note it must be xhtml strict so I cant use numbers as ID and the name "flag" (IF I do that it will work) what have I missed?

the code....
--------------------------------------

<?xml version = "1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"<html xmlns = "<head>
<title>Personal</title>
<link rel = "stylesheet" type = "text/css" href = "labb3.css" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<h1>Fly Forevers personal:</h1>
<h2>Klicka pa bilderna for att se dem i storre format.</h2>
<script type = "text/javascript">
<!--
var bilder = new Array ("ett.jpg", "tva.jpg", "tre.jpg", "fyra.jpg");
var bild = new Array();
var i;

function picClick()
{
if (event.srcElement.id)
{
i = event.srcElement.id;
document.images["tableCaption"].src = bild.src;

}
}

for (var i=0; i<bilder.length; i++)
{
bild = new Image;
bild.src = ;

}


document.onclick = picClick;

//-->

</script>
<ul class="tabell2">
<li> <img src="ett.jpg" width ="648" height ="486" alt="Personal" /> </li>
</ul>
<table border = "1" class="tabell1">
<colgroup>
<col align = "left" span = "1" />
</colgroup>
<tbody>
<tr>
<td> <img src="ett.jpg" id = "aa" width ="100" height ="100" alt="Tobias" />
</td>
</tr>
<tr>
<td> <img src="tva.jpg" id = "bb" width ="100" height ="100" alt="Krister" /></td>
</tr>
<tr>
<td> <img src="tre.jpg" id = "cc" width ="100" height ="100" alt="Niklas" /></td>
</tr>
<tr>
<td> <img src="fyra.jpg" id = "dd" width ="100" height ="100" alt="Katrin" /></td>
</tr>
</tbody>
</table>
</body>
</html>
 
What do you mean with "trim of...." could you please explain it? Im not so skilled in this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top