Preskoči na sadržaj
Ista raja. Nova runda.
GAMERZ.ba — REBORN
Diskusija

Refresh web stranice?

120 pregleda · 3 odgovora · otvorena 29.07.2009. u 23:49

Pozz svima,
imam jedno pitanje..
Kako da 'nastimam' da kad neko posjeti moj web stranicu,tj. ukuca link - da se stranica automatski refreshuje ?
pozz
Mislis nakon nekog perioda da se refreshuje, dok je user na stranici ili ?
Ako je to, mozes to odraditi meta tagovima.
da radi reload čitave stranice ;

<head> <meta http-equiv="refresh" content="5" />
</head>

ajax periodic updater ; prototype.js
<script>

new Ajax.PeriodicalUpdater('itemi', '/itemi.php', {
method: 'get', frequency: 3, decay: 2
});

</script>



ajax periodic updater za jquery :


<script>
function updejtajdiv()
{
$.get("stahos.php", function(data){

var counter = $('span#counter');
counter.html(parseInt(counter.html())+1);

if(prevContent != data)
{
$('#myDiv').html('The number returned was: '+data);
timerInterval = minTimeout;
prevContent = data;
setTimeout(updejtajdiv, timerInterval);
}else{
if(timerInterval < maxTimeout)
{
timerInterval = timerInterval * multiplier;
}
setTimeout(updejtajdiv, timerInterval);
}
});
}
$('document').ready(updejtajdiv);

</script>

http://www.prototypejs.org/api/ajax/periodicalUpdater
http://johnmccollum.co.uk/decay/

Post dobio aplauz od Jason

Vertazzar je napisao/la:
da radi reload čitave stranice ;

<head> <meta http-equiv="refresh" content="5" />
</head>

ajax periodic updater ; prototype.js
<script>

new Ajax.PeriodicalUpdater('itemi', '/itemi.php', {
method: 'get', frequency: 3, decay: 2
});

</script>



ajax periodic updater za jquery :


<script>
function updejtajdiv()
{
$.get("stahos.php", function(data){

var counter = $('span#counter');
counter.html(parseInt(counter.html())+1);

if(prevContent != data)
{
$('#myDiv').html('The number returned was: '+data);
timerInterval = minTimeout;
prevContent = data;
setTimeout(updejtajdiv, timerInterval);
}else{
if(timerInterval < maxTimeout)
{
timerInterval = timerInterval * multiplier;
}
setTimeout(updejtajdiv, timerInterval);
}
});
}
$('document').ready(updejtajdiv);

</script>

http://www.prototypejs.org/api/ajax/periodicalUpdater
http://johnmccollum.co.uk/decay/
Svaka čast...

I hvala ti na ovom, meni će trebat.


:D:D:D9-)9-)9-)

Prijavi se da bi odgovorio/la na ovu temu.