Jump to content
php.lv forumi

Kads var ieteikt ..


suport

Recommended Posts

Vajdzetu tadu lietu ka , piemram atseviscis panelis atjaunojas ik pec kada laicinja ,

Taka piemram ihack.lv negirbu spamot bet ka piemrs kur rada lietotajus , ka kads jauns ienak pasham nevajag refreshot lapu lai vinsh paradiitos , bet tas vis automatiski notiek!

Link to comment
Share on other sites

uz jQuery

$(document).ready(function() {
var refreshId = setInterval(function() {
	$('#dinamiskais').load('/includes/lietotaji.php?rand='+ Math.random());
}, 10000); //Ik pa 10 sekundēm
});

Link to comment
Share on other sites

1) lejuplādē http://jquery.com/ jQuery javascript bibliotēku un ievieto lapā.

<script type='text/javascript' src='saite/uz/jquery.js'></script>

 

2) ievieto lapā arī

<script type='text/javascript'>
$(document).ready(function() {
       var refreshId = setInterval(function() {
               $('#dinamiskais').load('/includes/lietotaji.php?rand='+ Math.random());
       }, 10000); //Ik pa 10 sekundēm
});
</script>

 

3) izveido failu ar lietotāju sarakstu vai arī ko tev tur vajag izvadīt (/includes/lietotaji.php)

 

4) izveido lapā

<div id="dinamiskais">
<?php
include('/includes/lietotaji.php');
?>
</div>

 

5) priecājies

Edited by Pentiums
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...