foto's stoppen met veranderen na RotateSlideshow3()

Overzicht Reageren

Sponsored by: Vacatures door Monsterboard

Senior, Medior and Junior SAP HANA Developer

Vacature details Vakgebied: Software/IT Opleiding: Medior Werklocatie: Veldhoven Vacature ID: 12696 Introductie Our client is the world's leading provider of lithography systems for the semiconductor industry, manufacturing complex machines that are critical to the production of integrated circuits or chips. Our purpose is “unlocking the potential of people and society by pushing technology to new limits”. We do this guided by the principles “Challenge”, “Collaborate” and “Care”. Wat verwachten we van jou? SAP Certified Application Associate - SAP HANA Cloud Modeling (training and/or certification) Bachelor degree or higher Excellent understanding of SAP HANA (2.0 / Cloud), Data Modelling and writing

Bekijk vacature »

Christophe Rogiers

Christophe Rogiers

24/04/2012 00:13:10
Quote Anchor link
Voorbeeld: http://dendermonderockt.be/

Code:
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<meta property="og:title" content="Dendermonde Rockt vzw - R.I.P." />
<meta property="og:description" content="1995 - 2012. Bedankt iedereen !!!" />
<meta property="og:image" content="http://www.dendermonderockt.be/img/bg400.jpg" />
<meta http-equiv="refresh" content=178>

<embed src='music/rip.mp3' hidden='true' autostart='true' loop='true' type='audio/mpeg' />

<script type="text/javascript">
function RotateSlideshow1()
{
    document.getElementById("slideshow1").setAttribute("src", "<?php $_GET['type']=0; include 'randim.php'; ?>");
    setTimeout('RotateSlideshow2()', 4000);
}

function RotateSlideshow2()
{
    document.getElementById("slideshow2").setAttribute("src", "<?php $_GET['type']=0; include 'randim.php'; ?>");
    setTimeout('RotateSlideshow3()', 4000);
}


function RotateSlideshow3()
{
    document.getElementById("slideshow3").setAttribute("src",  "<?php $_GET['type']=0; include 'randim.php'; ?>");
     setTimeout('RotateSlideshow1()', 4000);    
}

window.onload=function()
{
 setTimeout('RotateSlideshow1()', 4000);    
}

</script>

<title>Dendermonde Rockt vzw /  RIP 1995 - 2012 / Bedankt iedereen !!!</title>

<body bgcolor="black">

<table align="center" width="1200px">
    <tr><td align="center" valign="middle" colspan="3"><img src="img//bg400.jpg">
    <tr>
        <td align="center" valign="top" height="400px" width="400px">
            <img id="slideshow1" src="<?php $_GET['type']=0; include 'randim.php'; ?>">
        <td align="center" valign="top" height="400px" width="400px">
            <img id="slideshow2" src="<?php $_GET['type']=0; include 'randim.php'; ?>">
        <td align="center" valign="top" height="400px" width="400px">
            <img id="slideshow3" src="<?php $_GET['type']=0; include 'randim.php'; ?>">

</table>


Iemand een idee?
Gewijzigd op 24/04/2012 13:22:00 door Bas IJzelendoorn
 
PHP hulp

PHP hulp

19/05/2024 19:37:22
 
Rolf -

Rolf -

24/04/2012 10:01:36
Quote Anchor link
Zet eerst alles eens tussen [c ode ] [/ code ] tags (zonder spaties).
Daarnaast zit de echte slideshow in een functie. Dus waarschijnlijk moet je die functies ook posten.
Gewijzigd op 24/04/2012 10:02:26 door Rolf -
 
Kris Peeters

Kris Peeters

24/04/2012 12:28:08
Quote Anchor link
Wil je verder even uitleggen wat je vraag precies is?

Offtopic:

... En stopt Dendermonde Rockt, of zo?
Gewijzigd op 24/04/2012 12:39:37 door Kris Peeters
 
Christophe Rogiers

Christophe Rogiers

25/04/2012 20:33:52
Quote Anchor link
Het probleem is dat de slideshow stopt na 4 fotorefreshes... Dus na RotateSlideshow3 houdt het op.

randim.php geeft mij gewoon een foto uit een map door... hier ligt het probleem niet.

@Kris: jup ze zijn begin dit jaar gestopt.
 
Kris Peeters

Kris Peeters

26/04/2012 12:09:07
Quote Anchor link
Om te beginnen ... Je sluit je html tags niet af. Het is echt wel de bedoeling dat je dit doet.

---

Ik denk dat je met deze code hebt wat je nodig hebt.

Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<!doctype html>
<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta property="og:title" content="Dendermonde Rockt vzw - R.I.P." />
    <meta property="og:description" content="1995 - 2012. Bedankt iedereen !!!" />
    <meta property="og:image" content="http://www.dendermonderockt.be/img/bg400.jpg" />
    <title>Dendermonde Rockt vzw /  RIP 1995 - 2012 / Bedankt iedereen !!!</title>
    <style>
      body {
        background-color: black;
      }
    </style>
    <script>
      var rotate_index = 1;
      function rotate() {
        var d = new Date();
        var elm = 'slideshow' + rotate_index.toString();
        var url = "http://dendermonderockt.be/randim.php?d=" + d.getTime();
        document.getElementById(elm).src = url;
        rotate_index++;
        if (rotate_index > 3) {
          rotate_index = 1;
        }
        setTimeout(rotate, 4000);
      }
      setTimeout(rotate, 4000);
    </script>
  </head>
  <body>
    <table align="center" width="1200px">
      <tr><td align="center" valign="middle" colspan="3"><img src="http://dendermonderockt.be/img//bg400.jpg"></tr>
      <tr>
        <td align="center" valign="top" height="400px" width="400px">
          <img id="slideshow1" src="http://dendermonderockt.be/randim.php?d=1">
        </td>
        <td align="center" valign="top" height="400px" width="400px">
          <img id="slideshow2" src="http://dendermonderockt.be/randim.php?d=2">
        </td>
        <td align="center" valign="top" height="400px" width="400px">
          <img id="slideshow3" src="http://dendermonderockt.be/randim.php?d=3">
        </td>
      </tr>
    </table>
  </body>
</html>


Een beetje uitleg ...

Ik voeg overal een extra parameter toe: randim.php?d=...
als je van url verandert, zoekt de webbrowser niet in de cache.
Een simpel truukje is dan ook om de tijd mee te geven, als dummy variabele. Dat is sowieso uniek, voor de gebruiker.
Gewijzigd op 26/04/2012 12:15:59 door Kris Peeters
 
Christophe Rogiers

Christophe Rogiers

26/04/2012 13:24:31
Quote Anchor link
Erg bedankt Kris... het staat al online ;).
 



Overzicht Reageren

 
 

Om de gebruiksvriendelijkheid van onze website en diensten te optimaliseren maken wij gebruik van cookies. Deze cookies gebruiken wij voor functionaliteiten, analytische gegevens en marketing doeleinden. U vindt meer informatie in onze privacy statement.