powered by simpleCommunicator - 2.0.59     © 2025 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / HTML, JavaScript, VBScript, CSS [игнор отключен] [закрыт для гостей] / Динамические страницы
8 сообщений из 8, страница 1 из 1
Динамические страницы
    #34754204
k*y
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
k*y
Гость
Нужно обновлять данные на странице каждые 30 секунд. Как это сделать?
...
Рейтинг: 0 / 0
Динамические страницы
    #34754222
Фотография Хрюхрюшкин.
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Какие данные?
...
Рейтинг: 0 / 0
Динамические страницы
    #34754224
Фотография Хрюхрюшкин.
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Ajax
...
Рейтинг: 0 / 0
Динамические страницы
    #34754304
k*y
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
k*y
Гость
Данные биру из БД MySQL и заношу в таблицу с помощью PHP. Нужно обновлять данные в таблице через каждые 30 сек, т.к. в БД они меняются...
...
Рейтинг: 0 / 0
Динамические страницы
    #34754481
Фотография krvsa
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Как вариант, используй
Код: plaintext
window.setTimeout();
----------
Cache for Windows NT (Intel) 5.0.20 (Build 6305) Fri Sep 16 2005 11:54:10 EDT
...
Рейтинг: 0 / 0
Динамические страницы
    #34754609
k*y
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
k*y
Гость
krvsaКак вариант, используй
Код: plaintext
window.setTimeout();
----------
Cache for Windows NT (Intel) 5.0.20 (Build 6305) Fri Sep 16 2005 11:54:10 EDT

А можно поподробнее. Это JavaScript?
...
Рейтинг: 0 / 0
Динамические страницы
    #34754752
belugin
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
а может мета рефреш поможет

Meta refresh
...
Рейтинг: 0 / 0
Динамические страницы
    #34755248
Фотография krvsa
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
k*yЭто JavaScript?
Да. Вот некоторые подробности...
ДокументацияsetTimeout Method

--------------------------------------------------------------------------------

Evaluates an expression after a specified number of milliseconds has elapsed.

Syntax

iTimerID = window.setTimeout(vCode, iMilliSeconds [, sLanguage])
Parameters

vCode Required. Variant that specifies the function pointer or string that indicates the code to be executed when the specified interval has elapsed.
iMilliSeconds Required. Integer that specifies the number of milliseconds.
sLanguage Optional. String that specifies any one of the possible values for the LANGUAGE attribute.

Return Value

Integer. Returns an identifier that cancels the evaluation with the clearTimeout method.

Remarks

In versions earlier than Microsoft® Internet Explorer 5, the first argument of setTimeout must be a string. Evaluation of the string is deferred until the specified interval elapses.

As of Internet Explorer 5, the first argument of setTimeout can be a string or a function pointer.

The specified expression or function is evaluated once. For repeated evaluation, use the setInterval method.

Example

The following examples use the setTimeout method to evaluate a simple expression after one second has elapsed.
This example uses the setTimeout method to evaluate a slightly more complex expression than the one in the preceding example after one second has elapsed.

window.setTimeout("alert('Hello, world')", 1000);
The following example uses the setTimeout method to evaluate a slightly more complex expression after one second has elapsed.

var sMsg = "Hello, world";
window.setTimeout("alert(" + sMsg + ")", 1000);
This example uses the setTimeout method to hide a INPUT type=button object after three seconds. If the user clicks the Count Down button and then counts to three, the Now You See Me button disappears.

Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
<SCRIPT>
function fnHide(oToHide){
   window.setTimeout("fnHide2(" + oToHide.id + ")",  3000 );
}
function fnHide2(sID){
   var o = eval(sID);
   o.style.display="none";
}
</SCRIPT>
<INPUT TYPE=button VALUE="Now you see me ..." 
    ID="oHideButton" onclick="fnHide(this)">
This example uses a function pointer to pass the data. In this case, the data is stored in a global variable because it cannot be passed directly. In the preceding example, the ID of the button is passed as a parameter to the function invoked by the setTimeout method. This is possible only when a string is passed as the first argument.

Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
<SCRIPT>
var g_oToHide = null;

function fnHide(oToHide){
    g_oToHide = oToHide;
    window.setTimeout(fnHide2,  3000 );
}
function fnHide2(sID){
    if (g_oToHide) {
       g_oToHide.style.display="none";
    }
}
</SCRIPT>
<INPUT TYPE=button VALUE="Now you see me ..." ID="oHideButton" 
    onclick="fnHide(this)">
...
Рейтинг: 0 / 0
8 сообщений из 8, страница 1 из 1
Форумы / HTML, JavaScript, VBScript, CSS [игнор отключен] [закрыт для гостей] / Динамические страницы
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]