<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/">
  <channel>
    <title>JavaScript и AJAX</title>
    <description>JavaScript и технология AJAX</description>
    <pubDate>Sun, 07 Jun 2026 02:40:12 +0000</pubDate>
    <lastBuildDate>Sun, 07 Jun 2026 02:40:12 +0000</lastBuildDate>
    <generator>Форум PHP Программистов | PHP.ru</generator>
    <link>https://php.ru/forum/forums/javascript-i-ajax.16/</link>
    <atom:link rel="self" type="application/rss+xml" href="https://php.ru/forum/forums/javascript-i-ajax.16/index.rss"/>
    <item>
      <title>Почему не создается большой массив?</title>
      <pubDate>Sat, 02 May 2026 09:15:34 +0000</pubDate>
      <link>https://php.ru/forum/threads/pochemu-ne-sozdaetsja-bolshoj-massiv.155020/</link>
      <guid>https://php.ru/forum/threads/pochemu-ne-sozdaetsja-bolshoj-massiv.155020/</guid>
      <author>invalid@example.com (Атм_Евгений)</author>
      <dc:creator>Атм_Евгений</dc:creator>
      <content:encoded><![CDATA[Всем привет!<br />
Ребята, подскажите пожалуйста:<br />
<br />
Создаю массив let Arr_abc = [[1,2],[1,3],[1,4],[5,6] ... ];<br />
Если в массиве на каждый индекс 300 - 500 вложенных массивов, то все нормально.<br />
Но когда более 2000, то длина массива определяется верно, а сами данные не определяются - в консоль выводит &quot;нет свойств&quot;.<br />
Что делать?]]></content:encoded>
      <slash:comments>2</slash:comments>
    </item>
    <item>
      <title>Таймер обратного отсчета времени между определенными дата-время</title>
      <pubDate>Mon, 09 Feb 2026 12:33:56 +0000</pubDate>
      <link>https://php.ru/forum/threads/tajmer-obratnogo-otscheta-vremeni-mezhdu-opredelennymi-data-vremja.154774/</link>
      <guid>https://php.ru/forum/threads/tajmer-obratnogo-otscheta-vremeni-mezhdu-opredelennymi-data-vremja.154774/</guid>
      <author>invalid@example.com (Kuzma92)</author>
      <dc:creator>Kuzma92</dc:creator>
      <content:encoded><![CDATA[Здравствуйте уважаемые специалисты.<br />
<br />
Имеются у меня следующие данные (на PHP):<br />
<br />


<div class="bbCodeBlock bbCodePHP">
	<div class="type">PHP:</div>
	<div class="code"><ol class="php" style="font-family:monospace;"><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000088;">$time_start</span> <span style="color: #339933;">=</span> <a target="_blank" rel="nofollow" href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Y-m-d H:i:s&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$order</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// время, с которого начинается отсчет</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000088;">$time_finish</span> <span style="color: #339933;">=</span> <a target="_blank" rel="nofollow" href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Y-m-d H:i:s&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$order</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">+</span> <span style="color: #cc66cc;">900</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// время, когда заканчивается отсчет (интервал 15 минут)</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000088;">$time_current</span> <span style="color: #339933;">=</span> <a target="_blank" rel="nofollow" href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Y-m-d H:i:s&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// текущее время</span></div></li>
</ol></div>
</div>Пожалуйста, помогите написать на JavaScript самый простой таймер обратного отсчета времени, который будет выводить оставшееся время в следующем самом...<br />
<br />
<a href="https://php.ru/forum/threads/tajmer-obratnogo-otscheta-vremeni-mezhdu-opredelennymi-data-vremja.154774/" class="internalLink">Таймер обратного отсчета времени между определенными дата-время</a>]]></content:encoded>
      <slash:comments>1</slash:comments>
    </item>
    <item>
      <title>Как поправить код в JavaScript</title>
      <pubDate>Fri, 26 Dec 2025 04:03:38 +0000</pubDate>
      <link>https://php.ru/forum/threads/kak-popravit-kod-v-javascript.150322/</link>
      <guid>https://php.ru/forum/threads/kak-popravit-kod-v-javascript.150322/</guid>
      <author>invalid@example.com (sotex2)</author>
      <dc:creator>sotex2</dc:creator>
      <content:encoded><![CDATA[Доброго времени суток. Подска&#039;ите есть <br />
JavaScript скрипт он применяется в зенопостере. скрипт рабочий и предназначен для клика по надписи &quot;Показать ещё 5&quot;, где цифра может меняться. надписи &quot;Показать ещё 5&quot; прикреплена к конкретному блоку &quot;Нежилые помещения&quot; и действия осуществляются только в этом блоке. сам скрипт отрабатывает и делает клик по надписи, но когда текст полностью исчезает даже из DOM страницы, то скрипт все равно продол&#039;ает работать. как сделать так, чтобы после пропадания...<br />
<br />
<a href="https://php.ru/forum/threads/kak-popravit-kod-v-javascript.150322/" class="internalLink">Как поправить код в JavaScript</a>]]></content:encoded>
      <slash:comments>5</slash:comments>
    </item>
    <item>
      <title>Как узнать, что пришел запрос через AJAX</title>
      <pubDate>Tue, 28 Oct 2025 19:40:05 +0000</pubDate>
      <link>https://php.ru/forum/threads/kak-uznat-chto-prishel-zapros-cherez-ajax.145409/</link>
      <guid>https://php.ru/forum/threads/kak-uznat-chto-prishel-zapros-cherez-ajax.145409/</guid>
      <author>invalid@example.com (Fox-)</author>
      <dc:creator>Fox-</dc:creator>
      <content:encoded><![CDATA[Здравствуйте, как узнать, что пришел запрос через AJAX.<br />
Проверка HTTP_X_REQUESTED_WITH не подходит, при использовании fetch &#039;POST&#039; он не работает.И не<br />
 безопасно это.Пользуюсь кодом<br />


<div class="bbCodeBlock bbCodeCode">
	<div class="type">Код (Javascript):</div>
	<div class="code"><ol class="javascript" style="font-family:monospace;"><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">fetch<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'script.php'</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; method<span style="color: #339933;">:</span> <span style="color: #3366CC;">'POST'</span><span style="color: #339933;">,</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; headers<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #3366CC;">'Content-Type'</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">'application/json'</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; body<span style="color: #339933;">:</span> JSON.<span style="color: #660066;">stringify</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span> key<span style="color: #339933;">:</span> <span style="color: #3366CC;">'value'</span> <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">.<span style="color: #660066;">then</span><span style="color: #009900;">&#40;</span>response <span style="color: #339933;">=&gt;</span> response.<span style="color: #660066;">json</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">.<span style="color: #660066;">then</span><span style="color: #009900;">&#40;</span>data <span style="color: #339933;">=&gt;</span> <span style="color: #009900;">&#123;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; alert<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'Вы нажали на кнопку!'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#125;</span></div></li>
</ol></div>
</div>как предотвратить запуск скрипта...<br />
<br />
<a href="https://php.ru/forum/threads/kak-uznat-chto-prishel-zapros-cherez-ajax.145409/" class="internalLink">Как узнать, что пришел запрос через AJAX</a>]]></content:encoded>
    </item>
    <item>
      <title>анимация через setInterval</title>
      <pubDate>Sat, 04 Oct 2025 14:43:46 +0000</pubDate>
      <link>https://php.ru/forum/threads/animacija-cherez-setinterval.141906/</link>
      <guid>https://php.ru/forum/threads/animacija-cherez-setinterval.141906/</guid>
      <author>invalid@example.com (Norair_986)</author>
      <dc:creator>Norair_986</dc:creator>
      <content:encoded><![CDATA[по коду можно понять что я делаю анимацию<br />
вот код, в чем ошибка?<br />


<div class="bbCodeBlock bbCodeHtml">
	<div class="type">HTML:</div>
	<div class="code"><ol class="html5" style="font-family:monospace;"><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&lt;!doctype html&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&lt;<a target="_blank" rel="nofollow" href="http://december.com/html/4/element/html.html"><span style="color: #000000; font-weight: bold;">html</span></a>&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span style="color: #009900;">&lt;<a target="_blank" rel="nofollow" href="http://december.com/html/4/element/head.html"><span style="color: #000000; font-weight: bold;">head</span></a>&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">&lt;<a target="_blank" rel="nofollow" href="http://december.com/html/4/element/meta.html"><span style="color: #000000; font-weight: bold;">meta</span></a> <span style="color: #000066;">charset</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;utf-8&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">&lt;<a target="_blank" rel="nofollow" href="http://december.com/html/4/element/title.html"><span style="color: #000000; font-weight: bold;">title</span></a>&gt;</span>Моя тестовая страница<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a target="_blank" rel="nofollow" href="http://december.com/html/4/element/title.html"><span style="color: #000000; font-weight: bold;">title</span></a>&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">&lt;<a target="_blank" rel="nofollow" href="http://december.com/html/4/element/style.html"><span style="color: #000000; font-weight: bold;">style</span></a>&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #layer1 { z-index: 1;position:absolute; }</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #layer2 { z-index: 2; position:absolute;}</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #layer3 { z-index: 3;position:absolute; }</div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a target="_blank" rel="nofollow" href="http://december.com/html/4/element/style.html"><span style="color: #000000; font-weight: bold;">style</span></a>&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a target="_blank" rel="nofollow" href="http://december.com/html/4/element/head.html"><span style="color: #000000; font-weight: bold;">head</span></a>&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span style="color: #009900;">&lt;<a target="_blank" rel="nofollow" href="http://december.com/html/4/element/body.html"><span style="color: #000000; font-weight: bold;">body</span></a>&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">&lt;<a target="_blank" rel="nofollow" href="http://december.com/html/4/element/img.html"><span style="color: #000000; font-weight: bold;">img</span></a> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;alienb.jpg&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Моё тестовое изображение&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;layer1&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">&lt;<a target="_blank" rel="nofollow" href="http://december.com/html/4/element/img.html"><span style="color: #000000; font-weight: bold;">img</span></a> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;imgs/1.png&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Моё тестовое...</span></span></div></li>
</ol></div>
</div><a href="https://php.ru/forum/threads/animacija-cherez-setinterval.141906/" class="internalLink">анимация через setInterval</a>]]></content:encoded>
      <slash:comments>3</slash:comments>
    </item>
    <item>
      <title>JavaScript class captchaCV</title>
      <pubDate>Wed, 26 Mar 2025 08:18:59 +0000</pubDate>
      <link>https://php.ru/forum/threads/javascript-class-captchacv.103100/</link>
      <guid>https://php.ru/forum/threads/javascript-class-captchacv.103100/</guid>
      <author>invalid@example.com (Vladimir Kheifets)</author>
      <dc:creator>Vladimir Kheifets</dc:creator>
      <content:encoded><![CDATA[Класс captchaCV создаёт captcha и проверяет введённой код.<br />
<a href="https://github.com/VladimirKheifets/JS-Class-captchaCV" target="_blank" class="externalLink" rel="nofollow">https://github.com/VladimirKheifets/JS-Class-captchaCV</a><br />
Демо:<br />
<a href="https://www.alto-booking.com/developer/captchaCV" target="_blank" class="externalLink" rel="nofollow">https://www.alto-booking.com/developer/captchaCV</a><br />
<a href="https://www.alto-booking.com/developer/captchaCV/?la=de" target="_blank" class="externalLink" rel="nofollow">https://www.alto-booking.com/developer/captchaCV//?la=de</a><br />
<a href="https://www.alto-booking.com/developer/captchaCV/?la=ru" target="_blank" class="externalLink" rel="nofollow">https://www.alto-booking.com/developer/captchaCV/?la=ru</a><br />
Пимер:<br />


<div class="bbCodeBlock bbCodeHtml">
	<div class="type">HTML:</div>
	<div class="code"><ol class="html5" style="font-family:monospace;"><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&lt;<a target="_blank" rel="nofollow" href="http://december.com/html/4/element/html.html"><span style="color: #000000; font-weight: bold;">html</span></a>&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&lt;<a target="_blank" rel="nofollow" href="http://december.com/html/4/element/head.html"><span style="color: #000000; font-weight: bold;">head</span></a>&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&lt;<a target="_blank" rel="nofollow" href="http://december.com/html/4/element/link.html"><span style="color: #000000; font-weight: bold;">link</span></a> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;captchaCV.css&quot;</span>&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&lt;<a target="_blank" rel="nofollow" href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;captchaCV.min.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><a target="_blank" rel="nofollow" href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span>...</div></li>
</ol></div>
</div><a href="https://php.ru/forum/threads/javascript-class-captchacv.103100/" class="internalLink">JavaScript class captchaCV</a>]]></content:encoded>
      <slash:comments>40</slash:comments>
    </item>
    <item>
      <title>DevTools - как найти обработчик клика?</title>
      <pubDate>Mon, 16 Dec 2024 11:12:35 +0000</pubDate>
      <link>https://php.ru/forum/threads/devtools-kak-najti-obrabotchik-klika.102974/</link>
      <guid>https://php.ru/forum/threads/devtools-kak-najti-obrabotchik-klika.102974/</guid>
      <author>invalid@example.com (senglory)</author>
      <dc:creator>senglory</dc:creator>
      <content:encoded><![CDATA[Вот так у меня выглядит DevTools:<br />
<br />
Вопрос - как найти тут обработчик клика на выделенной кнопке?]]></content:encoded>
      <slash:comments>2</slash:comments>
    </item>
    <item>
      <title>блокируется localStorage и sessionStorage</title>
      <pubDate>Wed, 06 Nov 2024 18:22:18 +0000</pubDate>
      <link>https://php.ru/forum/threads/blokiruetsja-localstorage-i-sessionstorage.97548/</link>
      <guid>https://php.ru/forum/threads/blokiruetsja-localstorage-i-sessionstorage.97548/</guid>
      <author>invalid@example.com (ещё один igor)</author>
      <dc:creator>ещё один igor</dc:creator>
      <content:encoded><![CDATA[Вопрос: что вообще в теории может вызвать блокировку хранилища?<br />
<br />
Сайт корпоративный, хранилище блокируется только на одной странице, зато во всех браузерах.<br />
Из расширения браузера работает, но если код встроить в страницу, то не работает. <br />
Ошибок не выдаётся.<br />
<br />
В Хроме есть возможность задать команду из консоли - тоже не произошла запись.<br />
<br />
Понятия не имею, что это может быть. Сейчас думаю, что в коде страницы есть нечто, что блокирует хранилище. Что-то, чего нет на других страницах. Но что...<br />
<br />
<a href="https://php.ru/forum/threads/blokiruetsja-localstorage-i-sessionstorage.97548/" class="internalLink">блокируется localStorage и sessionStorage</a>]]></content:encoded>
      <slash:comments>1</slash:comments>
    </item>
    <item>
      <title>Все работает нормально, но в консоли выходит назойливое сообщение об ошибке...почему?</title>
      <pubDate>Thu, 22 Aug 2024 18:54:02 +0000</pubDate>
      <link>https://php.ru/forum/threads/vse-rabotaet-normalno-no-v-konsoli-vyxodit-nazojlivoe-soobschenie-ob-oshibke-pochemu.102556/</link>
      <guid>https://php.ru/forum/threads/vse-rabotaet-normalno-no-v-konsoli-vyxodit-nazojlivoe-soobschenie-ob-oshibke-pochemu.102556/</guid>
      <author>invalid@example.com (гендаль серый)</author>
      <dc:creator>гендаль серый</dc:creator>
      <content:encoded><![CDATA[В мозиле то все нормально работает, то потом начинает само по себе показывать сообщение об ошибке, в хроме все чисто ошибок нет.<br />
сообщение с ошибкой такого характера - <br />
01:00:43.216 Error: this.requestMonitor.pipelineSteps.cookieContext is undefined 6 undefined<br />
<br />
нейросетка говорит что это может быть какая то библиотека конфликтовать типа, но у меня только jquery подключена. или это с браузером или плагин для него наколдовал какой то...началось все после того как я плагин поставил для ютуба...<br />
<br />
<a href="https://php.ru/forum/threads/vse-rabotaet-normalno-no-v-konsoli-vyxodit-nazojlivoe-soobschenie-ob-oshibke-pochemu.102556/" class="internalLink">Все работает нормально, но в консоли выходит назойливое сообщение об ошибке...почему?</a>]]></content:encoded>
      <slash:comments>1</slash:comments>
    </item>
    <item>
      <title>Почему после отправки ответа на клиент через ajax теряется начало страницы?</title>
      <pubDate>Wed, 24 Jul 2024 18:21:19 +0000</pubDate>
      <link>https://php.ru/forum/threads/pochemu-posle-otpravki-otveta-na-klient-cherez-ajax-terjaetsja-nachalo-stranicy.102481/</link>
      <guid>https://php.ru/forum/threads/pochemu-posle-otpravki-otveta-na-klient-cherez-ajax-terjaetsja-nachalo-stranicy.102481/</guid>
      <author>invalid@example.com (гендаль серый)</author>
      <dc:creator>гендаль серый</dc:creator>
      <content:encoded><![CDATA[добавление комментов сделал все нормально, добавляются в блок комментариев к которому подключено делегирование событий, в каждом блоке коммента есть свой блок для ответов и вот когда приходит ответ, то пишет - <br />
 Эта страница загружена в режиме Quirks. Это может повлиять на макет страницы. Для режима Standards используйте «&lt;!DOCTYPE html&gt;».<br />
<br />
получается не видит тег DOCTYPE в начале страницы, но при добавлении комментов такого не было и все работает<br />
<br />
обработчик на php в принципе такой же как и...<br />
<br />
<a href="https://php.ru/forum/threads/pochemu-posle-otpravki-otveta-na-klient-cherez-ajax-terjaetsja-nachalo-stranicy.102481/" class="internalLink">Почему после отправки ответа на клиент через ajax теряется начало страницы?</a>]]></content:encoded>
      <slash:comments>15</slash:comments>
    </item>
    <item>
      <title>Мобильное меню и якорь</title>
      <pubDate>Tue, 04 Jun 2024 05:42:17 +0000</pubDate>
      <link>https://php.ru/forum/threads/mobilnoe-menju-i-jakor.102352/</link>
      <guid>https://php.ru/forum/threads/mobilnoe-menju-i-jakor.102352/</guid>
      <author>invalid@example.com (shiyri)</author>
      <dc:creator>shiyri</dc:creator>
      <content:encoded><![CDATA[Добрый день, подскажите пожалуйста, как закрыть меню, после клика по ссылке якорю, ведь не происходит перезагрузки страницы. До якоря страница проматывается, а потом заново открывается мобильное меню.<br />
<br />
<br />


<div class="bbCodeBlock bbCodeCode">
	<div class="type">Код (Javascript):</div>
	<div class="code"><ol class="javascript" style="font-family:monospace;"><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000066; font-weight: bold;">function</span> menu_bottom_line_active<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">var</span> off <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#mobile-menu &gt; ul &gt; li.show'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">offset</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; left <span style="color: #339933;">=</span> off.<span style="color: #660066;">left</span><span style="color: #339933;">,</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; right <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>window<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">width</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> left <span style="color: #339933;">-</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#mobile-menu &gt; ul &gt; li.show'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">width</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#mobile-menu &gt; ul &gt; li.show'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">width</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;style&gt;.navbar-wrap &gt;...</span></div></li>
</ol></div>
</div><a href="https://php.ru/forum/threads/mobilnoe-menju-i-jakor.102352/" class="internalLink">Мобильное меню и якорь</a>]]></content:encoded>
      <slash:comments>1</slash:comments>
    </item>
    <item>
      <title>Как принять ответ ajax jquery?</title>
      <pubDate>Sat, 01 Jun 2024 18:20:17 +0000</pubDate>
      <link>https://php.ru/forum/threads/kak-prinjat-otvet-ajax-jquery.102309/</link>
      <guid>https://php.ru/forum/threads/kak-prinjat-otvet-ajax-jquery.102309/</guid>
      <author>invalid@example.com (гендаль серый)</author>
      <dc:creator>гендаль серый</dc:creator>
      <content:encoded><![CDATA[по замыслу из обработчика должен передаваться готовый блок комментария. в этом блоке через переменную в атрибут data блока передается id коммента плюс переменные юзера, тайтла, поста и тд..тоесть готовый блок html.<br />
так же должны работать все кнопки в блоке - тоесть нужно сделать что бы он добавился сразу делегированным в общий блок комментов.<br />
передаю черз json но что то не выходит....буду признателен если кто обьяснит детально.<br />
долго разбираюсь уже.]]></content:encoded>
      <slash:comments>4</slash:comments>
    </item>
    <item>
      <title>Передача параметра download в window.location.search</title>
      <pubDate>Thu, 25 Apr 2024 10:13:52 +0000</pubDate>
      <link>https://php.ru/forum/threads/peredacha-parametra-download-v-window-location-search.102244/</link>
      <guid>https://php.ru/forum/threads/peredacha-parametra-download-v-window-location-search.102244/</guid>
      <author>invalid@example.com (Programmed)</author>
      <dc:creator>Programmed</dc:creator>
      <content:encoded><![CDATA[Привет всем разработчикам!<br />
<br />
Есть рабочий код на PHP + JavaSript, основной смысл которого показать 10-секундную задержку перед скачиванием файла. При скачивании хочется подставить более-менее семантическое имя, а не 0013, для этого, передаю параметр download в window.location.search, но ничего не происходит... Что сделано не так?<br />
<br />


<div class="bbCodeBlock bbCodePHP">
	<div class="type">PHP:</div>
	<div class="code"><ol class="php" style="font-family:monospace;"><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&lt;div class=&quot;divblock&quot;&gt;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">&lt;?php</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000088;">$formats</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'is_url'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$books</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">books_is_fb2_url</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'extension'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'.fb2'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'button_label'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'FB2'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000088;">$formats</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=...</span></div></li>
</ol></div>
</div><a href="https://php.ru/forum/threads/peredacha-parametra-download-v-window-location-search.102244/" class="internalLink">Передача параметра download в window.location.search</a>]]></content:encoded>
      <slash:comments>1</slash:comments>
    </item>
    <item>
      <title>вернуть ответ после выполнения скрипта</title>
      <pubDate>Sun, 07 Apr 2024 13:47:04 +0000</pubDate>
      <link>https://php.ru/forum/threads/vernut-otvet-posle-vypolnenija-skripta.102198/</link>
      <guid>https://php.ru/forum/threads/vernut-otvet-posle-vypolnenija-skripta.102198/</guid>
      <author>invalid@example.com (l_2001)</author>
      <dc:creator>l_2001</dc:creator>
      <content:encoded><![CDATA[здравствуйте! есть такой скрипт<br />


<div class="bbCodeBlock bbCodeCode">
	<div class="type">Код (Javascript):</div>
	<div class="code"><ol class="javascript" style="font-family:monospace;"><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// unblock when ajax activity stops</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ajaxStop</span><span style="color: #009900;">&#40;</span>$.<span style="color: #660066;">unblockUI</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">function</span> test1<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $.<span style="color: #660066;">ajax</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span> url<span style="color: #339933;">:</span> <span style="color: #3366CC;">'DelClientsAndGroup.php'</span><span style="color: #339933;">,</span> cache<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">false</span> <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">function</span> test2<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $.<span style="color: #660066;">ajax</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span> url<span style="color: #339933;">:</span> <span style="color: #3366CC;">'AddClientsAndGroup.php'</span><span style="color: #339933;">,</span> cache<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">false</span> <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>...</div></li>
</ol></div>
</div><a href="https://php.ru/forum/threads/vernut-otvet-posle-vypolnenija-skripta.102198/" class="internalLink">вернуть ответ после выполнения скрипта</a>]]></content:encoded>
      <slash:comments>9</slash:comments>
    </item>
    <item>
      <title>Загрузка файла с помощью перетаскивания его в окно Браузера</title>
      <pubDate>Sun, 24 Mar 2024 05:37:08 +0000</pubDate>
      <link>https://php.ru/forum/threads/zagruzka-fajla-s-pomoschju-peretaskivanija-ego-v-okno-brauzera.102110/</link>
      <guid>https://php.ru/forum/threads/zagruzka-fajla-s-pomoschju-peretaskivanija-ego-v-okno-brauzera.102110/</guid>
      <author>invalid@example.com (Sergey_k6)</author>
      <dc:creator>Sergey_k6</dc:creator>
      <content:encoded><![CDATA[Добрый день подскажите пожалуйста что делаю не так:<br />
<br />


<div class="bbCodeBlock bbCodeCode">
	<div class="type">Код (Javascript):</div>
	<div class="code"><ol class="javascript" style="font-family:monospace;"><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; let elem_ID &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #339933;">=</span> <span style="color: #3366CC;">'drop_zone_table'</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; let MyDropZone &nbsp; &nbsp; <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span>elem_ID<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; let hoverClassName <span style="color: #339933;">=</span> <span style="color: #3366CC;">'hover'</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Блокировка зоны дропа при перетаскивании //</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; window.<span style="color: #660066;">addEventListener</span><span style="color: #009900;">&#40;</span>\<span style="color: #3366CC;">&quot;dragenter<span style="color: #000099; font-weight: bold;">\&quot;</span>, function(e) {</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3366CC;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;console.log('e.target.id =&gt; '+e.target.id);</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3366CC;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (e.target.id != elem_ID) {...</span></div></li>
</ol></div>
</div><a href="https://php.ru/forum/threads/zagruzka-fajla-s-pomoschju-peretaskivanija-ego-v-okno-brauzera.102110/" class="internalLink">Загрузка файла с помощью перетаскивания его в окно Браузера</a>]]></content:encoded>
      <slash:comments>3</slash:comments>
    </item>
    <item>
      <title>Регулярное выражение для поиска формы</title>
      <pubDate>Tue, 12 Mar 2024 14:04:10 +0000</pubDate>
      <link>https://php.ru/forum/threads/reguljarnoe-vyrazhenie-dlja-poiska-formy.102137/</link>
      <guid>https://php.ru/forum/threads/reguljarnoe-vyrazhenie-dlja-poiska-formy.102137/</guid>
      <author>invalid@example.com (Rocketware)</author>
      <dc:creator>Rocketware</dc:creator>
      <content:encoded><![CDATA[Всем привет! <br />
Сейчас я изучаю регулярные выражения в разрезе JavaScript.<br />
Регулярка в коде, который я нашел, находит первую форму:<br />


<div class="bbCodeBlock bbCodeCode">
	<div class="type">Код (Javascript):</div>
	<div class="code"><ol class="javascript" style="font-family:monospace;"><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;">/&lt;</span>form<span style="color: #009900;">&#91;</span><span style="color: #339933;">^&gt;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">+</span><span style="color: #009900;">&#91;</span><span style="color: #339933;">^&gt;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">*&gt;/</span>i</div></li>
</ol></div>
</div>Подскажите, пожалуйста, как сделать регулярку, которая бы находила вторую по счету форму?]]></content:encoded>
      <slash:comments>2</slash:comments>
    </item>
    <item>
      <title>Как выводить только первую ошибку в ответ ajax при валидации формы?</title>
      <pubDate>Mon, 19 Feb 2024 19:13:08 +0000</pubDate>
      <link>https://php.ru/forum/threads/kak-vyvodit-tolko-pervuju-oshibku-v-otvet-ajax-pri-validacii-formy.102079/</link>
      <guid>https://php.ru/forum/threads/kak-vyvodit-tolko-pervuju-oshibku-v-otvet-ajax-pri-validacii-formy.102079/</guid>
      <author>invalid@example.com (гендаль серый)</author>
      <dc:creator>гендаль серый</dc:creator>
      <content:encoded><![CDATA[у меня обработчик формы собирает все ошибки в массив и этот массив при наличии ошибо выдает сразу все ошибки пользователю..не пойму как на js jquery сделать чтобы выдавалась только первая ошибка из массива.<br />
в ajax у меня такая строчка вывода ошибок -<br />


<div class="bbCodeBlock bbCodeCode">
	<div class="type">Код (Javascript):</div>
	<div class="code"><ol class="javascript" style="font-family:monospace;"><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.info-content'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span>response.<span style="color: #660066;">errors</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li>
</ol></div>
</div>в php сбор массива сделан таким образом - <br />


<div class="bbCodeBlock bbCodePHP">
	<div class="type">PHP:</div>
	<div class="code"><ol class="php" style="font-family:monospace;"><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><a target="_blank" rel="nofollow" href="http://www.php.net/empty"><span style="color: #990000;">empty</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$errors</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$response</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'success'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'errors'</span> <span style="color: #339933;">=&gt;</span> <a target="_blank" rel="nofollow" href="http://www.php.net/implode"><span style="color: #990000;">implode</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">' '</span><span style="color: #339933;">,</span> <span style="color: #000088;">$errors</span><span style="color: #009900;">&#41;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#93;</span><span style="color: #339933;">;...</span></div></li>
</ol></div>
</div><a href="https://php.ru/forum/threads/kak-vyvodit-tolko-pervuju-oshibku-v-otvet-ajax-pri-validacii-formy.102079/" class="internalLink">Как выводить только первую ошибку в ответ ajax при валидации формы?</a>]]></content:encoded>
      <slash:comments>8</slash:comments>
    </item>
    <item>
      <title>Как добавить новый блок в ответе ajax?</title>
      <pubDate>Mon, 19 Feb 2024 09:27:45 +0000</pubDate>
      <link>https://php.ru/forum/threads/kak-dobavit-novyj-blok-v-otvete-ajax.102018/</link>
      <guid>https://php.ru/forum/threads/kak-dobavit-novyj-blok-v-otvete-ajax.102018/</guid>
      <author>invalid@example.com (гендаль серый)</author>
      <dc:creator>гендаль серый</dc:creator>
      <content:encoded><![CDATA[запрос такой<br />


<div class="bbCodeBlock bbCodeCode">
	<div class="type">Код (Javascript):</div>
	<div class="code"><ol class="javascript" style="font-family:monospace;"><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.input_post'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">submit</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; e.<span style="color: #660066;">preventDefault</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// Prevent form submission</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">var</span> formData <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">new</span> FormData<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// Create a FormData object</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; $.<span style="color: #660066;">ajax</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; url<span style="color: #339933;">:</span> <span style="color: #3366CC;">'обработчик формы'</span><span style="color: #339933;">,</span> <span style="color: #006600; font-style: italic;">// Replace with your server-side script URL</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; type<span style="color: #339933;">:</span> <span style="color: #3366CC;">'POST'</span><span style="color: #339933;">,</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; data<span style="color: #339933;">:</span> formData<span style="color: #339933;">,</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; processData<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">,</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; contentType<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">,</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; success<span style="color: #339933;">:</span> <span style="color: #000066; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>response<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Insert the response data at the top of the...</span></div></li>
</ol></div>
</div><a href="https://php.ru/forum/threads/kak-dobavit-novyj-blok-v-otvete-ajax.102018/" class="internalLink">Как добавить новый блок в ответе ajax?</a>]]></content:encoded>
      <slash:comments>7</slash:comments>
    </item>
    <item>
      <title>Var, Let и Const в ошибках Javascript</title>
      <pubDate>Tue, 30 Jan 2024 04:50:36 +0000</pubDate>
      <link>https://php.ru/forum/threads/var-let-i-const-v-oshibkax-javascript.102023/</link>
      <guid>https://php.ru/forum/threads/var-let-i-const-v-oshibkax-javascript.102023/</guid>
      <author>invalid@example.com (peadroRS)</author>
      <dc:creator>peadroRS</dc:creator>
      <content:encoded><![CDATA[Привет! В настоящее время я изучаю различия между var, let и const в JavaScript, но столкнулся с некоторыми проблемами в понимании их нюансов. Ниже приведен фрагмент кода, который иллюстрирует мои области неопределенности:<br />
<br />


<div class="bbCodeBlock bbCodeCode">
	<div class="type">Код (Javascript):</div>
	<div class="code"><ol class="javascript" style="font-family:monospace;"><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #006600; font-style: italic;">// Code Snippet 5</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">let counter <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000066; font-weight: bold;">const</span> increment <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; counter<span style="color: #339933;">++;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">increment<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span>counter<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">increment<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span>counter<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000066; font-weight: bold;">const</span> decrement <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; counter<span style="color: #339933;">--;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">decrement<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span>counter<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
</ol></div>
</div>Вот конкретные...<br />
<br />
<a href="https://php.ru/forum/threads/var-let-i-const-v-oshibkax-javascript.102023/" class="internalLink">Var, Let и Const в ошибках Javascript</a>]]></content:encoded>
      <slash:comments>2</slash:comments>
    </item>
    <item>
      <title>перенос сайта nodejs</title>
      <pubDate>Wed, 24 Jan 2024 06:11:47 +0000</pubDate>
      <link>https://php.ru/forum/threads/perenos-sajta-nodejs.102007/</link>
      <guid>https://php.ru/forum/threads/perenos-sajta-nodejs.102007/</guid>
      <author>invalid@example.com (vikrorpert)</author>
      <dc:creator>vikrorpert</dc:creator>
      <content:encoded><![CDATA[переношу сайт на другой сервер<br />
скопировал каталог,пытаюсь запустить<br />


<div class="bbCodeBlock bbCodeCode">
	<div class="type">Код (Text):</div>
	<div class="code"><ol class="text" style="font-family:monospace;"><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">node /path to site/node_modules/.bin/nuxt start</div></li>
</ol></div>
</div>получаю ошибку<br />


<div class="bbCodeBlock bbCodeCode">
	<div class="type">Код (Text):</div>
	<div class="code"><ol class="text" style="font-family:monospace;"><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">node node_modules/.bin/nuxt start</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">internal/modules/cjs/loader.js:638</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; throw err;</div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; ^</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Error: Cannot find module '../package.json'</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
</ol></div>
</div>если удаляю node_modules и запускаю команду npm install то после повторного запуска получаю ошибку<br />


<div class="bbCodeBlock bbCodeCode">
	<div class="type">Код (Text):</div>
	<div class="code"><ol class="text" style="font-family:monospace;"><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">node...</div></li>
</ol></div>
</div><a href="https://php.ru/forum/threads/perenos-sajta-nodejs.102007/" class="internalLink">перенос сайта nodejs</a>]]></content:encoded>
    </item>
  </channel>
</rss>
