GRY-Online.pl --> Archiwum Forum

Problem ze slajdami w htmlu

26.05.2007
15:32
smile
[1]

jagged_alliahdnbedffds [ <--= FlaQ ]

Problem ze slajdami w htmlu

Mam pewien problem. A mianowicie - co trzeba zrobić, aby posiadać na stronie pokaz slajdów (zdjęcia zmieniające się co kilka sekund) i gdy kliknę myszką dane zdjęcie to pokaże mi się ono w innej stronie na całym ekranie (funkcja _blank itd. to wiem) - chodzi oczywiście o pisanie html'em...
Skrypt to slajdów wygląda tak:

spoiler start

W ramach HEAD
<script>

// Set speed (milliseconds)
var speed = 3000

// Specify the image files
var Pic = new Array() // don't touch this
// to add more images, just continue
// the pattern, adding to the array below

Pic[0] = '../grafika/ami.gif'
Pic[1] = '../grafika/pcq.gif'
Pic[2] = '../grafika/enter.gif'

var t
var j = 0
var p = Pic.length

var preLoad = new Array()
for (i = 0; i < p; i++)‹
preLoad = new Image()
preLoad.src = Pic


function runSlideShow()‹
document.images.SlideShow.src = preLoad[j].src
j = j + 1
if (j > (p-1)) j=0
t = setTimeout('runSlideShow()', speed)


</script>

Definicja BODY
<body onload="runSlideShow()">

W ramach BODY
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td id="VU" height=80 width=114>
<img src="../grafika/ami.gif" name='SlideShow' width=80 height=114></td>
</tr>
</table>

spoiler stop

26.05.2007
15:45
[2]

Scatterhead [ łapaj dzień ]

W ramach HEAD
<script>

// Set speed (milliseconds)
var speed = 3000

// Specify the image files
var Pic = new Array() // don't touch this
// to add more images, just continue
// the pattern, adding to the array below

Pic[0] = '../grafika/ami.gif'
Pic[1] = '../grafika/pcq.gif'
Pic[2] = '../grafika/enter.gif'

var t
var j = 0
var p = Pic.length

var preLoad = new Array()
for (i = 0; i < p; i++)‹
preLoad = new Image()
preLoad.src = Pic


function runSlideShow()‹
document.images.SlideShow.src = preLoad[j].src
j = j + 1
if (j > (p-1)) j=0
t = setTimeout('runSlideShow()', speed)



function fullScreen(theURL) ‹
window.open(theURL, '', 'fullscreen=yes, scrollbars=auto');

</script>


Definicja BODY
<body onload="runSlideShow()">

W ramach BODY
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td id="VU" height=80 width=114>
<a href="javascript:void(0)" onClick="fullScreen(document.images.SlideShow.src)"><img src="../grafika/ami.gif" name='SlideShow' width=80 height=114></a></td>
</tr>
</table>

powinno działać, tylko pamiętaj o zamianie >< na klamerki

© 2000-2024 GRY-OnLine S.A.