Problème code avec insertion script galerie
loloeim
-
Tarkus -
Tarkus -
Bonjour,
Je souhaite insérer dans mon code html un code html / script pour une galerie d'images. le code de la galerie est fait, mais quand je l'insère dans le code de la page, ma page ne ressemble plus à rien, quoi que je fasse.
Voici le code de la page (avec le code de la galerie ... qui fait bugger la page):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Photographer Portfolio</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link href="css/styles.css" rel="stylesheet" type="text/css" />
<style>
*
{
font-family : arial;
font-size : 12pt;
}
body
{
margin : 10px;
padding : 0px;
border : 0px;
}
.titre
{
font-weight : bold;
}
</style>
<script type="text/javascript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<script>
function ImageItem(url,txt)
{
this.url = url;
this.txt = txt;
}
function ImageList(imgId,txtId)
{
this.imgId = imgId;
this.txtId = txtId;
this.items = new Array();
}
ImageList.prototype.add = function(url,txt)
{
var item = new ImageItem(url,txt);
this.items.push(item);
return item;
}
ImageList.prototype.swap = function(index)
{
document.getElementById(this.imgId).src = this.items[index].url;
document.getElementById(this.txtId).innerHTML = this.items[index].txt;
}
var imageList = new ImageList("fontaine_large","fontaine_txt");
function load()
{
imageList.add("images/galeriefontaine/fontaine01.png","Ceci est l'image 1"); // Image 0
imageList.add("images/galeriefontaine/fontaine02.png","Prise de vue du ...."); // Image 1
imageList.add("images/galeriefontaine/fontaine03.png","Zoom"); // Image 2
// Etc ...
}
</script>
</head>
<body onload="MM_preloadImages('images/btn_1_over.jpg','images/btn_2_over.jpg','images/btn_3_over.jpg','images/btn_4_over.jpg','images/btn_5_over.jpg');load()";">
<!-- Save for Web Slices (index.psd) -->
<table width="775" height="825" border="0" align="center" cellpadding="0" cellspacing="0" id="table_01">
<tr>
<td width="28" height="0" nowrap="nowrap"></td>
<td width="137" height="0" nowrap="nowrap"></td>
<td width="93" height="0" nowrap="nowrap"></td>
<td width="28" height="0" nowrap="nowrap"></td>
<td width="32" height="0" nowrap="nowrap"></td>
<td width="20" height="0" nowrap="nowrap"></td>
<td width="12" height="0" nowrap="nowrap"></td>
<td width="122" height="0" nowrap="nowrap"></td>
<td width="44" height="0" nowrap="nowrap"></td>
<td width="29" height="0" nowrap="nowrap"></td>
<td width="22" height="0" nowrap="nowrap"></td>
<td width="59" height="0" nowrap="nowrap"></td>
<td width="133" height="0" nowrap="nowrap"></td>
<td width="16" height="0" nowrap="nowrap"></td>
<td width="0" height="0"></td>
</tr>
<tr>
<td width="165" height="54" colspan="2">
<a href="index.html">
<img src="images/btn_1.jpg" alt="" name="btn_1" width="165" height="54" border="0" id="btn_1" onmouseover="MM_swapImage('btn_1','','images/btn_1_over.jpg',1)" onmouseout="MM_swapImgRestore()"/></a></td>
<td width="153" height="54" colspan="3">
<a href="contentpage.html">
<img src="images/btn_2.jpg" alt="" name="btn_2" width="153" height="54" border="0" id="btn_2" onmouseover="MM_swapImage('btn_2','','images/btn_2_over.jpg',1)" onmouseout="MM_swapImgRestore()"/></a></td>
<td width="154" height="54" colspan="3">
<a href="contentpage.html">
<img src="images/btn_3.jpg" alt="" name="btn_3" width="154" height="54" border="0" id="btn_3" onmouseover="MM_swapImage('btn_3','','images/btn_3_over.jpg',1)" onmouseout="MM_swapImgRestore()"/></a></td>
<td width="154" height="54" colspan="4">
<a href="contentpage.html">
<img src="images/btn_4.jpg" alt="" name="btn_4" width="154" height="54" border="0" id="btn_4" onmouseover="MM_swapImage('btn_4','','images/btn_4_over.jpg',1)" onmouseout="MM_swapImgRestore()"/></a></td>
<td width="149" height="54" colspan="2">
<a href="contentpage.html">
<img src="images/btn_5.jpg" alt="" name="btn_5" width="149" height="54" border="0" id="btn_5" onmouseover="MM_swapImage('btn_5','','images/btn_5_over.jpg',1)" onmouseout="MM_swapImgRestore()"/></a></td>
<td width="0" height="54" nowrap="nowrap"></td>
</tr>
<tr>
<td width="775" height="387" colspan="14">
<img src="images/main.jpg" width="775" height="387" alt="" /></td>
<td width="0" height="387" nowrap="nowrap"></td>
</tr>
<tr>
<td width="775" height="309" colspan="14" rowspan="12" class="text1">
<tr>
<td>
<div align="center">
<img src="images/galeriefontaine/thumb_fontaine01.jpg" alt="fontaine01" width="75" height="42" onmouseover="imageList.swap(0)" />
<img src="images/galeriefontaine/thumb_fontaine02.jpg" alt="fontaine01" width="75" height="42" onmouseover="imageList.swap(1)" />
<img src="images/galeriefontaine/thumb_fontaine03.jpg" alt="fontaine01" width="75" height="42" onmouseover="imageList.swap(2)" />
<br />
</div>
</td>
</tr>
<tr>
<td>
<div align="center"><img src="images/galeriefontaine/fontaine01.png" alt="fontaine_large" name="fontaine_large" width="697" height="397" id="fontaine_large" />
<p id="fontaine_txt" class="titre">Ceci est l'image 1</p>
</div>
</td>
</tr>
</td>
<td width="0" height="30" nowrap="nowrap"></td>
</tr>
<tr>
<td width="0" height="76" nowrap="nowrap"></td>
</tr>
<tr>
<td width="0" height="8" nowrap="nowrap"></td>
</tr>
<tr>
<td width="0" height="52" nowrap="nowrap"></td>
</tr>
<tr>
<td width="0" height="6" nowrap="nowrap"></td>
</tr>
<tr>
<td width="0" height="3" nowrap="nowrap"></td>
</tr>
<tr>
<td width="0" height="11" nowrap="nowrap"></td>
</tr>
<tr>
<td width="0" height="41" nowrap="nowrap"></td>
</tr>
<tr>
<td width="0" height="6" nowrap="nowrap"></td>
</tr>
<tr>
<td width="0" height="3" nowrap="nowrap"></td>
</tr>
<tr>
<td width="0" height="52" nowrap="nowrap"></td>
</tr>
<tr>
<td width="0" height="21" nowrap="nowrap"></td>
</tr>
<tr>
<td width="775" height="4" colspan="14">
<img src="images/bottom.jpg" width="775" height="4" alt="" /></td>
<td width="0" height="4" nowrap="nowrap"></td>
</tr>
<tr>
<td width="775" height="71" colspan="14" align="center" valign="middle" class="text2"><a href="index.html">HOME</a> | <a href="contentpage.html">ABOUT ME</a> | <a href="contentpage.html">PORTFOLIO</a> | <a href="contentpage.html">PROJECTS</a> | <a href="contentpage.html">NEWS</a> | <a href="contentpage.html">CONTACTS</a><br />
Copyright © Your Company Name</td>
<td width="0" height="71" nowrap="nowrap"></td>
</tr>
</table>
<!-- End Save for Web Slices -->
</body>
</html>
Est ce que quelqu'un pourrait checker le code et me dire où se situe le problème?
Votre aide est grandement attendue!
Merci beaucoup.
Je souhaite insérer dans mon code html un code html / script pour une galerie d'images. le code de la galerie est fait, mais quand je l'insère dans le code de la page, ma page ne ressemble plus à rien, quoi que je fasse.
Voici le code de la page (avec le code de la galerie ... qui fait bugger la page):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Photographer Portfolio</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link href="css/styles.css" rel="stylesheet" type="text/css" />
<style>
*
{
font-family : arial;
font-size : 12pt;
}
body
{
margin : 10px;
padding : 0px;
border : 0px;
}
.titre
{
font-weight : bold;
}
</style>
<script type="text/javascript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<script>
function ImageItem(url,txt)
{
this.url = url;
this.txt = txt;
}
function ImageList(imgId,txtId)
{
this.imgId = imgId;
this.txtId = txtId;
this.items = new Array();
}
ImageList.prototype.add = function(url,txt)
{
var item = new ImageItem(url,txt);
this.items.push(item);
return item;
}
ImageList.prototype.swap = function(index)
{
document.getElementById(this.imgId).src = this.items[index].url;
document.getElementById(this.txtId).innerHTML = this.items[index].txt;
}
var imageList = new ImageList("fontaine_large","fontaine_txt");
function load()
{
imageList.add("images/galeriefontaine/fontaine01.png","Ceci est l'image 1"); // Image 0
imageList.add("images/galeriefontaine/fontaine02.png","Prise de vue du ...."); // Image 1
imageList.add("images/galeriefontaine/fontaine03.png","Zoom"); // Image 2
// Etc ...
}
</script>
</head>
<body onload="MM_preloadImages('images/btn_1_over.jpg','images/btn_2_over.jpg','images/btn_3_over.jpg','images/btn_4_over.jpg','images/btn_5_over.jpg');load()";">
<!-- Save for Web Slices (index.psd) -->
<table width="775" height="825" border="0" align="center" cellpadding="0" cellspacing="0" id="table_01">
<tr>
<td width="28" height="0" nowrap="nowrap"></td>
<td width="137" height="0" nowrap="nowrap"></td>
<td width="93" height="0" nowrap="nowrap"></td>
<td width="28" height="0" nowrap="nowrap"></td>
<td width="32" height="0" nowrap="nowrap"></td>
<td width="20" height="0" nowrap="nowrap"></td>
<td width="12" height="0" nowrap="nowrap"></td>
<td width="122" height="0" nowrap="nowrap"></td>
<td width="44" height="0" nowrap="nowrap"></td>
<td width="29" height="0" nowrap="nowrap"></td>
<td width="22" height="0" nowrap="nowrap"></td>
<td width="59" height="0" nowrap="nowrap"></td>
<td width="133" height="0" nowrap="nowrap"></td>
<td width="16" height="0" nowrap="nowrap"></td>
<td width="0" height="0"></td>
</tr>
<tr>
<td width="165" height="54" colspan="2">
<a href="index.html">
<img src="images/btn_1.jpg" alt="" name="btn_1" width="165" height="54" border="0" id="btn_1" onmouseover="MM_swapImage('btn_1','','images/btn_1_over.jpg',1)" onmouseout="MM_swapImgRestore()"/></a></td>
<td width="153" height="54" colspan="3">
<a href="contentpage.html">
<img src="images/btn_2.jpg" alt="" name="btn_2" width="153" height="54" border="0" id="btn_2" onmouseover="MM_swapImage('btn_2','','images/btn_2_over.jpg',1)" onmouseout="MM_swapImgRestore()"/></a></td>
<td width="154" height="54" colspan="3">
<a href="contentpage.html">
<img src="images/btn_3.jpg" alt="" name="btn_3" width="154" height="54" border="0" id="btn_3" onmouseover="MM_swapImage('btn_3','','images/btn_3_over.jpg',1)" onmouseout="MM_swapImgRestore()"/></a></td>
<td width="154" height="54" colspan="4">
<a href="contentpage.html">
<img src="images/btn_4.jpg" alt="" name="btn_4" width="154" height="54" border="0" id="btn_4" onmouseover="MM_swapImage('btn_4','','images/btn_4_over.jpg',1)" onmouseout="MM_swapImgRestore()"/></a></td>
<td width="149" height="54" colspan="2">
<a href="contentpage.html">
<img src="images/btn_5.jpg" alt="" name="btn_5" width="149" height="54" border="0" id="btn_5" onmouseover="MM_swapImage('btn_5','','images/btn_5_over.jpg',1)" onmouseout="MM_swapImgRestore()"/></a></td>
<td width="0" height="54" nowrap="nowrap"></td>
</tr>
<tr>
<td width="775" height="387" colspan="14">
<img src="images/main.jpg" width="775" height="387" alt="" /></td>
<td width="0" height="387" nowrap="nowrap"></td>
</tr>
<tr>
<td width="775" height="309" colspan="14" rowspan="12" class="text1">
<tr>
<td>
<div align="center">
<img src="images/galeriefontaine/thumb_fontaine01.jpg" alt="fontaine01" width="75" height="42" onmouseover="imageList.swap(0)" />
<img src="images/galeriefontaine/thumb_fontaine02.jpg" alt="fontaine01" width="75" height="42" onmouseover="imageList.swap(1)" />
<img src="images/galeriefontaine/thumb_fontaine03.jpg" alt="fontaine01" width="75" height="42" onmouseover="imageList.swap(2)" />
<br />
</div>
</td>
</tr>
<tr>
<td>
<div align="center"><img src="images/galeriefontaine/fontaine01.png" alt="fontaine_large" name="fontaine_large" width="697" height="397" id="fontaine_large" />
<p id="fontaine_txt" class="titre">Ceci est l'image 1</p>
</div>
</td>
</tr>
</td>
<td width="0" height="30" nowrap="nowrap"></td>
</tr>
<tr>
<td width="0" height="76" nowrap="nowrap"></td>
</tr>
<tr>
<td width="0" height="8" nowrap="nowrap"></td>
</tr>
<tr>
<td width="0" height="52" nowrap="nowrap"></td>
</tr>
<tr>
<td width="0" height="6" nowrap="nowrap"></td>
</tr>
<tr>
<td width="0" height="3" nowrap="nowrap"></td>
</tr>
<tr>
<td width="0" height="11" nowrap="nowrap"></td>
</tr>
<tr>
<td width="0" height="41" nowrap="nowrap"></td>
</tr>
<tr>
<td width="0" height="6" nowrap="nowrap"></td>
</tr>
<tr>
<td width="0" height="3" nowrap="nowrap"></td>
</tr>
<tr>
<td width="0" height="52" nowrap="nowrap"></td>
</tr>
<tr>
<td width="0" height="21" nowrap="nowrap"></td>
</tr>
<tr>
<td width="775" height="4" colspan="14">
<img src="images/bottom.jpg" width="775" height="4" alt="" /></td>
<td width="0" height="4" nowrap="nowrap"></td>
</tr>
<tr>
<td width="775" height="71" colspan="14" align="center" valign="middle" class="text2"><a href="index.html">HOME</a> | <a href="contentpage.html">ABOUT ME</a> | <a href="contentpage.html">PORTFOLIO</a> | <a href="contentpage.html">PROJECTS</a> | <a href="contentpage.html">NEWS</a> | <a href="contentpage.html">CONTACTS</a><br />
Copyright © Your Company Name</td>
<td width="0" height="71" nowrap="nowrap"></td>
</tr>
</table>
<!-- End Save for Web Slices -->
</body>
</html>
Est ce que quelqu'un pourrait checker le code et me dire où se situe le problème?
Votre aide est grandement attendue!
Merci beaucoup.
A voir également:
- Problème code avec insertion script galerie
- Code ascii - Guide
- Code puk bloqué - Guide
- Comment déverrouiller un téléphone quand on a oublié le code - Guide
- Code activation windows 10 - Guide
- Galerie photo en ligne gratuite - Guide