Widget theme du mois
2 participants
Forum gratuit : Le forum des forums actifs :: Entraide & Support... :: Problème avec un script, un code :: Archives des problèmes avec un code
Page 1 sur 1 • Partagez
Widget theme du mois
Coucou tout le monde
J'ai un petit probleme de code.Je tente d'installer tant bien que mal le widget du mois en faisant defiler 3 films a l'affiche/mois.
Seul hic,l'image ne s'affiche pas,pourquoi?
Voici mon code:
Merci d'avance
Aventurine
J'ai un petit probleme de code.Je tente d'installer tant bien que mal le widget du mois en faisant defiler 3 films a l'affiche/mois.
Seul hic,l'image ne s'affiche pas,pourquoi?
Voici mon code:
- Code:
<style type="text/css">
.picshow { z-index:444; position:relative; background-color:#ffffff; width: 100%; height: 135px}
.picshow_main { position: relative; width: 180px; height: 280px}
.picshow_main .imgbig { filter: progid:dximagetransform.microsoft.wipe(gradientsize=1.0,wipestyle=4, motion=forward); width: 180px; height: 280px}
.picshow_change {position: absolute; text-align: left; bottom: 0px; height: 30px; right: 0px; left: 50px;}
.picshow_change img {width:15px; height: 15px}
.picshow_change a { border: 1px solid; display: block; float: left; margin-right: 5px; -display: inline}
a.axx { border-color: #555}
a.axx:hover {border-color: #000}
a.axx img { filter: alpha(opacity=40); opacity: 0.4; -moz-opacity: 0.4}
a.axx:hover img {filter: alpha(opacity=100); opacity: 1.0; -moz-opacity: 1.0}
a.bxx { border-color: #000}
a.bxx:hover {border-color: #000}
img{
border:0px}
</style>
<SCRIPT language=javascript>
var counts = 5;
img1 = new Image();
img1.src = '<a href="http://www.casimages.com" class="postlink" target="_blank" rel="nofollow"><img src="http://nsa26.casimages.com/img/2011/02/15/110215042819279475.jpg" border="0" alt="" /></a>';
img2 = new Image();
img2.src = '<a href="http://www.casimages.com" class="postlink" target="_blank" rel="nofollow"><img src="http://nsa26.casimages.com/img/2011/02/15/110215040107761266.jpg" border="0" alt="" /></a>';
img3 = new Image();
img3.src = '<a href="http://www.casimages.com" class="postlink" target="_blank" rel="nofollow"><img src="http://nsa25.casimages.com/img/2011/02/15/110215040808628248.jpg" border="0" alt="" /></a>'
var smallImg = new Array();
smallImg[0] = 'http://i60.servimg.com/u/f60/12/10/25/45/index_10.gif';
smallImg[1] = 'http://i60.servimg.com/u/f60/12/10/25/45/index_11.gif';
smallImg[2] = 'http://i60.servimg.com/u/f60/12/10/25/45/index_12.gif';
url1 = 'http://avenue-esotiquaires.pro-forum.fr/t241-les-ensorceleuses#810';
url2 = 'http://avenue-esotiquaires.pro-forum.fr/t242-apparitions#811';
url3 = 'http://avenue-esotiquaires.pro-forum.fr/t243-premonitions#812';
alt1 = new Image();
alt1.alt = 'Les Ensorceleuses';
alt2 = new Image();
alt2.alt = 'Apparitions'
var nn = 1;
var key = 0;
function change_img() {
if (key == 0) {
key = 1;
} else if (document.all) {
document.getElementById("pic").filters[0].Apply();
document.getElementById("pic").filters[0].Play(duration = 2);
}
eval('document.getElementById("pic").src=img' + nn + '.src');
eval('document.getElementById("url_theme").href=url' + nn);
eval('document.getElementById("pic").alt=alt' + nn + '.alt');
if (nn == 1) {
document.getElementById("url_theme").target = "_blank";
document.getElementById("url_theme").style.cursor = "pointer";
} else {
document.getElementById("url_theme").target = "_blank"
document.getElementById("url_theme").style.cursor = "pointer"
}
for ( var i = 1; i <= counts; i++) {
document.getElementById("xxjdjj" + i).className = 'axx';
}
document.getElementById("xxjdjj" + nn).className = 'bxx';
nn++;
if (nn > counts) {
nn = 1;
}
tt = setTimeout('change_img()', 7000);
}
function changeimg(n) {
nn = n;
window.clearInterval(tt);
change_img();
}
function ImageShow() {
document.write('<div class="picshow_main">');
document.write('<div><a id="url_theme"><img id="pic" class="imgbig" /></a></div>');
document.write('<div class="picshow_change">');
for ( var i = 0; i < counts; i++) {
document.write('<a href="javascript:changeimg(' + (i + 1)
+ ');" id="xxjdjj' + (i + 1)
+ '" class="axx" target="_self"><img src="' + smallImg[i]
+ '"></a>');
}
document.write('</div></div>');
change_img();
}
</SCRIPT>
<SCRIPT language="javascript" type="text/javascript">
ImageShow();
</SCRIPT>
Merci d'avance
Aventurine
Re: Widget theme du mois
Bonjour,
Les adresses des images sont erronées, veuillez ressayer avec le code suivant:
Cordialement
Les adresses des images sont erronées, veuillez ressayer avec le code suivant:
- Code:
<style type="text/css">
.picshow { z-index:444; position:relative; background-color:#ffffff; width: 100%; height: 135px}
.picshow_main { position: relative; width: 180px; height: 280px}
.picshow_main .imgbig { filter: progid:dximagetransform.microsoft.wipe(gradientsize=1.0,wipestyle=4, motion=forward); width: 180px; height: 280px}
.picshow_change {position: absolute; text-align: left; bottom: 0px; height: 30px; right: 0px; left: 50px;}
.picshow_change img {width:15px; height: 15px}
.picshow_change a { border: 1px solid; display: block; float: left; margin-right: 5px; -display: inline}
a.axx { border-color: #555}
a.axx:hover {border-color: #000}
a.axx img { filter: alpha(opacity=40); opacity: 0.4; -moz-opacity: 0.4}
a.axx:hover img {filter: alpha(opacity=100); opacity: 1.0; -moz-opacity: 1.0}
a.bxx { border-color: #000}
a.bxx:hover {border-color: #000}
img{
border:0px}
</style>
<SCRIPT language=javascript>
var counts = 3;
img1 = new Image();
img1.src = 'http://nsa26.casimages.com/img/2011/02/15/110215042819279475.jpg';
img2 = new Image();
img2.src = 'http://nsa26.casimages.com/img/2011/02/15/110215040107761266.jpg';
img3 = new Image();
img3.src = 'http://nsa25.casimages.com/img/2011/02/15/110215040808628248.jpg';
var smallImg = new Array();
smallImg[0] = 'http://i60.servimg.com/u/f60/12/10/25/45/index_10.gif';
smallImg[1] = 'http://i60.servimg.com/u/f60/12/10/25/45/index_11.gif';
smallImg[2] = 'http://i60.servimg.com/u/f60/12/10/25/45/index_12.gif';
url1 = 'http://avenue-esotiquaires.pro-forum.fr/t241-les-ensorceleuses#810';
url2 = 'http://avenue-esotiquaires.pro-forum.fr/t242-apparitions#811';
url3 = 'http://avenue-esotiquaires.pro-forum.fr/t243-premonitions#812';
alt1 = new Image();
alt1.alt = 'Les Ensorceleuses';
alt2 = new Image();
alt2.alt = 'Apparitions';
alt3 = new Image();
alt3.alt = 'autre';
var nn = 1;
var key = 0;
function change_img() {
if (key == 0) {
key = 1;
} else if (document.all) {
document.getElementById("pic").filters[0].Apply();
document.getElementById("pic").filters[0].Play(duration = 2);
}
eval('document.getElementById("pic").src=img' + nn + '.src');
eval('document.getElementById("url_theme").href=url' + nn);
eval('document.getElementById("pic").alt=alt' + nn + '.alt');
if (nn == 1) {
document.getElementById("url_theme").target = "_blank";
document.getElementById("url_theme").style.cursor = "pointer";
} else {
document.getElementById("url_theme").target = "_blank"
document.getElementById("url_theme").style.cursor = "pointer"
}
for ( var i = 1; i <= counts; i++) {
document.getElementById("xxjdjj" + i).className = 'axx';
}
document.getElementById("xxjdjj" + nn).className = 'bxx';
nn++;
if (nn > counts) {
nn = 1;
}
tt = setTimeout('change_img()', 7000);
}
function changeimg(n) {
nn = n;
window.clearInterval(tt);
change_img();
}
function ImageShow() {
document.write('<div class="picshow_main">');
document.write('<div><a id="url_theme"><img id="pic" class="imgbig" /></a></div>');
document.write('<div class="picshow_change">');
for ( var i = 0; i < counts; i++) {
document.write('<a href="javascript:changeimg(' + (i + 1)
+ ');" id="xxjdjj' + (i + 1)
+ '" class="axx" target="_self"><img src="' + smallImg[i]
+ '"></a>');
}
document.write('</div></div>');
change_img();
}
</SCRIPT>
<SCRIPT language="javascript" type="text/javascript">
ImageShow();
</SCRIPT>
Cordialement
Dernière édition par Zen le Mar 15 Fév 2011 - 15:53, édité 1 fois
Shadow- Modéractive
-
Messages : 24354
Inscrit(e) le : 30/03/2007
Re: Widget theme du mois
Super ca marche nickel!!Merci beaucoup
Pouvez vous m'expliquer ce qu'il fallait faire afin que je ne reproduise pas la meme erreur?
Que signifie les adresses des images erronées?je dois prendre lesquelles?
Merci d'avance
Amitié
Pouvez vous m'expliquer ce qu'il fallait faire afin que je ne reproduise pas la meme erreur?
Que signifie les adresses des images erronées?je dois prendre lesquelles?
Merci d'avance
Amitié
Re: Widget theme du mois
Vous n'avez que 3 images donc var counts = 3, ensuite les adresses des images que vous avez insérées étaient le code HTML.
var counts = 3;
img1 = new Image();
img1.src = 'https://nsa26.casimages.com/img/2011/02/15/110215042819279475.jpg';
img2 = new Image();
img2.src = 'https://nsa26.casimages.com/img/2011/02/15/110215040107761266.jpg';
img3 = new Image();
img3.src = 'https://nsa25.casimages.com/img/2011/02/15/110215040808628248.jpg';
Voilà!
var counts = 3;
img1 = new Image();
img1.src = 'https://nsa26.casimages.com/img/2011/02/15/110215042819279475.jpg';
img2 = new Image();
img2.src = 'https://nsa26.casimages.com/img/2011/02/15/110215040107761266.jpg';
img3 = new Image();
img3.src = 'https://nsa25.casimages.com/img/2011/02/15/110215040808628248.jpg';
Voilà!
Shadow- Modéractive
-
Messages : 24354
Inscrit(e) le : 30/03/2007
Sujets similaires
» Widgets theme du mois sur ce Forum
» widget theme du mois
» Widget thème du mois
» Création d'un widget qui ressemble au thème du mois sur ce forum
» [Widget] Rendre possible la visualisation du mois suivant sur le widget calendrier
» widget theme du mois
» Widget thème du mois
» Création d'un widget qui ressemble au thème du mois sur ce forum
» [Widget] Rendre possible la visualisation du mois suivant sur le widget calendrier
Forum gratuit : Le forum des forums actifs :: Entraide & Support... :: Problème avec un script, un code :: Archives des problèmes avec un code
Page 1 sur 1
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum