<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=386846&amp;view=findpost&amp;p=3413738</guid>
        <pubDate>Thu, 13 Feb 2014 09:43:00 +0000</pubDate>
        <title>Помогите обработать событие onsubmit при post запросе</title>
        <link>https://forum.sources.ru/index.php?showtopic=386846&amp;view=findpost&amp;p=3413738</link>
        <description><![CDATA[Serzant: <strong class='tag-b'>FrOsT</strong>, не сразу нашел подсветку JS.<br>
По поводу запроса разобрался, сам немного ступил, можно обойтись и без этого события:)]]></description>
        <author>Serzant</author>
        <category>Delphi: Сетевое программирование</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=386846&amp;view=findpost&amp;p=3413645</guid>
        <pubDate>Thu, 13 Feb 2014 06:07:22 +0000</pubDate>
        <title>Помогите обработать событие onsubmit при post запросе</title>
        <link>https://forum.sources.ru/index.php?showtopic=386846&amp;view=findpost&amp;p=3413645</link>
        <description><![CDATA[Fr0sT: <strong class='tag-b'>Serzant</strong>, ну есть же подсветка JS, зачем его как паскаль подсвечивать...<br>
А основная функция, насколько я могу судить, по большей части рассчитана на заливку файлов; надо бы прогнать трассировкой, но мне кажется, что если заливку выкинуть, то нужный код сократится до нескольких строчек.<br>
Тем не менее, вариант с браузером, имхо, самый правильный. Т.к. если код скриптов на сайте поменяется, придется заново лезть и разбираться в изменениях, и пересобирать прогу]]></description>
        <author>Fr0sT</author>
        <category>Delphi: Сетевое программирование</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=386846&amp;view=findpost&amp;p=3413436</guid>
        <pubDate>Wed, 12 Feb 2014 11:03:14 +0000</pubDate>
        <title>Помогите обработать событие onsubmit при post запросе</title>
        <link>https://forum.sources.ru/index.php?showtopic=386846&amp;view=findpost&amp;p=3413436</link>
        <description><![CDATA[Serzant: <strong class='tag-b'>FrOsT</strong>, я не силен в JS, но попробую разобрать функцию, как я ее понимаю.<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">function funitbDO() { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// Вызываем функцию</div><div class="code_line">var act=&#39;/mail/&#39;, upref=&#39;77KB1wdisF&#39;, uploadId, wnd; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Объявляем переменные и загружаем значения - act=&#39;/mail/&#39;, upref=&#39;77KB1wdisF&#39;, uploadId, wnd</div><div class="code_line">try { var tr=checksubmit(); if(!tr){return false;} } catch(e) {} &nbsp; // Тут как я понял идет проверка на корректность заполнения формы (функцию checksubmit на странице не нашел, но так как это проверка и форма заполнена верно, думаю можно это опустить...)</div><div class="code_line">if(sblmb1==1) { return false; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// Проверяем переменную на равенство, если равна 1, то так же return false;</div><div class="code_line">sblmb1=1; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// Прошли все проверки и приступаем к составлению запроса, присваиваем sblmb1 = 1; &nbsp; &nbsp; &nbsp;</div><div class="code_line">window._uploadIdx = window._uploadIdx ? window._uploadIdx+1 : 1; &nbsp; // Присваиваем глобальной переменной window._uploadIdx, при каждом запросе увеличиваем на + 1 </div><div class="code_line">uploadId = &#39;up&#39; + window._uploadIdx + &#39;_&#39; + upref; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Затем в переменную uploadId присваиваем &#39;up1_77KB1wdisF&#39;;</div><div class="code_line">var frm = $(&#39;#mffitbDO&#39;)[0]; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Вызываем функцию и присваиваем значение TRUE = 0, mffitbDO - это id формы, я так понимаю id = 0, то беж проверка пройдена и можно отправлять запрос... </div><div class="code_line">frm.action=act+&#39;?upsession=&#39;+uploadId; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Составляем запрос для отправки &#39;/mail/?upsession=up1_77KB1wdisF&#39;</div><div class="code_line">wnd = new _uWnd( &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Присваиваем и вызываем функцию new _uWnd, которая ХЗ что делает, все функции внутри этой функции опишу ниже....</div><div class="code_line">&#39;sendMFe1&#39;,</div><div class="code_line">&#39;Отправка сообщения&#39;,</div><div class="code_line">-350,</div><div class="code_line">-100,</div><div class="code_line">{</div><div class="code_line">footerh:25,</div><div class="code_line">footerc:&#39; &#39;,</div><div class="code_line">autosize:0,</div><div class="code_line">modal:1,</div><div class="code_line">closeonesc:1,</div><div class="code_line">resize:0,</div><div class="code_line">hidefooter:0,</div><div class="code_line">contentsizeprio:0,</div><div class="code_line">onbeforeclose:function(){},</div><div class="code_line">onclose:function(wnd){</div><div class="code_line">if(wnd._myuploadTimer) clearTimeout(wnd._myuploadTimer); &nbsp; &nbsp; &nbsp; &nbsp; // Если условие выполнено то очищаем и присваиваем null;</div><div class="code_line">wnd._myuploadTimer=null;</div><div class="code_line">}</div><div class="code_line">},</div><div class="code_line">{</div><div class="code_line">form:frm</div><div class="code_line">}</div><div class="code_line">);</div><div class="code_line">wnd._myuploadStarted=0; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// wnd._myuploadStarted присваиваем ноль.... &nbsp;</div><div class="code_line">_uploadCheck.call({upload_wnd:wnd.idx,upload_id:uploadId}); &nbsp; &nbsp;// Запускаем функцию, которая тоже ХЗ что делает.</div><div class="code_line">}</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script><br>
<br>
<strong class='tag-b'>А вот функции, которые запускались внутри этой функции:</strong><br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">[B]$[/B](function(){_uBuildMenu(&#39;#uMenuDiv1&#39;,0,document.location.href+&#39;/&#39;,&#39;uMenuItemA&#39;,&#39;uMenuArrow&#39;,2500);})</div><div class="code_line">&#60;a href=&quot;javascript://&quot; rel=&quot;nofollow&quot; onclick=&quot;[B]new _uWnd[/B](&#39;LF&#39;,&#39; &#39;,-250,-110,{autosize:0,closeonesc:1,resize:1},{url:&#39;/index/40&#39;});return false;&quot; title=&quot;Вход&quot;&#62;&#60;!--&#60;s3087&#62;--&#62;Вход&#60;!--&#60;/s&#62;--&#62;&#60;/a&#62;</div><div class="code_line">function _uploadCheck() {</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var w=_uWnd.all[this.upload_wnd];</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(!w || w.state.destroyed) return;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;w._myuploadTimer=setTimeout(&quot;_uploadProgress(&#39;&quot;+this.upload_id+&quot;&#39;,&quot;+this.upload_wnd+&quot;)&quot;,3000);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;function _uploadProgress(upId,widx) {</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(_uWnd.all[widx]) _uWnd.all[widx]._myuploadTimer=null;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var o={upload_wnd:widx,upload_id:upId,dataType:&#39;json&#39;,type:&#39;GET&#39;,timeout:5000,cache:1,success:_uploadTick,error: function(a, b, c) { console.log(&#39;Test!&#39;, a, &#39;-&#39;, b, &#39;-&#39;, c); }};</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;try {</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;_uAjaxRequest(&quot;/.uploadstatus?upsession=&quot;+upId,o);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;} catch(e) {</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;_uploadCheck.call(o,null,&#39;error&#39;);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;function _uploadTick(data,st) {</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var w=_uWnd.all[this.upload_wnd];</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(!w || w.state.destroyed) return;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(data.state==&#39;error&#39;) {</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(data.status==413) _uWnd.alert(&#39;Суммарный размер файлов превышает допустимое значение 15 МБ&#39;,&#39;&#39;,{w:230,h:80,tm:3000});</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else _uWnd.alert(&#39;Ошибка соединения, попробуйте позже (&#39;+data.status+&#39;)&#39;,&#39;&#39;,{w:230,h:80,tm:3000});</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;w.close();</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sblmb1=0;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;} else if(data.state==&#39;starting&#39; &amp;&amp; w._myuploadStarted) {</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;_uWnd.alert(&#39;Ошибка соединения, попробуйте позже&#39;,&#39;&#39;,{w:230,h:80,tm:3000});</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;w.close();</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;} else if(data.state==&#39;uploading&#39; || data.state==&#39;done&#39;) {</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var cents;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(data.state==&#39;done&#39; || data.size==0) {</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;w.footer(&#39;&#39;);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;} else {</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cents=Math.floor(data.received/data.size*1000)/10;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;w.footer(&#39;&#60;div style=&quot;border:1px solid;position:relative&quot;&#62;&#60;div class=&quot;myWinTD2&quot; style=&quot;width:&#39;+Math.floor(cents)+&#39;%;height:20px&quot;&#62;&#60;/div&#62;&#60;div style=&quot;text-align:center;position:absolute;left:0;top:0;width:100%;height:20px;font-size:14px&quot;&#62;&#39;+cents+&#39;% (&#39;+Math.floor(data.received/1024)+&#39; Kb)&#60;/div&#62;&#60;/div&#62;&#39;);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;w._myuploadStarted=1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(data.state==&#39;done&#39;) {</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sblmb1=0;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;_uploadCheck.call(this);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var sblmb1=0;</div></ol></div></div></div></div><br>
<br>
Собственно вопрос, что делать? Уже есть желание плюнуть и прикрутить браузер для обработки всей этой каши:)]]></description>
        <author>Serzant</author>
        <category>Delphi: Сетевое программирование</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=386846&amp;view=findpost&amp;p=3413246</guid>
        <pubDate>Wed, 12 Feb 2014 06:01:54 +0000</pubDate>
        <title>Помогите обработать событие onsubmit при post запросе</title>
        <link>https://forum.sources.ru/index.php?showtopic=386846&amp;view=findpost&amp;p=3413246</link>
        <description><![CDATA[Fr0sT: Если не требуется ничего аплоадить, то надо смотреть, что делает checksubmit() <br>
<br>
<span class="tag-color tag-color-named" data-value="gray" style="color: gray"><span class='tag-size' data-value='7' style='font-size:7pt;'>Добавлено <time class="tag-mergetime" datetime="2014-02-12T06:02:48+00:00">12.02.14, 06:02</time></span></span><br>
Да, и юзай подсветку кода не паскаля, а соответствующую.]]></description>
        <author>Fr0sT</author>
        <category>Delphi: Сетевое программирование</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=386846&amp;view=findpost&amp;p=3413206</guid>
        <pubDate>Tue, 11 Feb 2014 19:44:34 +0000</pubDate>
        <title>Помогите обработать событие onsubmit при post запросе</title>
        <link>https://forum.sources.ru/index.php?showtopic=386846&amp;view=findpost&amp;p=3413206</link>
        <description><![CDATA[Serzant: Неужели никто не знает?]]></description>
        <author>Serzant</author>
        <category>Delphi: Сетевое программирование</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=386846&amp;view=findpost&amp;p=3412948</guid>
        <pubDate>Tue, 11 Feb 2014 13:19:30 +0000</pubDate>
        <title>Помогите обработать событие onsubmit при post запросе</title>
        <link>https://forum.sources.ru/index.php?showtopic=386846&amp;view=findpost&amp;p=3412948</link>
        <description><![CDATA[Serzant: Добрый вечер&#33;<br>
<br>
Ситуация следующая, для примера возьмем сайт на ucoz, форма обратной связи <a class='tag-url' href='http://sfgbsdfgjhfbhdg.ucoz.ru/index/0-3' target='_blank'>http://sfgbsdfgjhfbhdg.ucoz.ru/index/0-3</a><br>
<br>
Задача следующая, заполнить все поля, обработать капчу и отправить запрос. С полями и капчей проблем нет, а вот отправить запрос не получается из за <strong class='tag-b'>onsubmit</strong>, так как нужно запустить функцию проверки корректности введенных данных в форме.<br>
<br>
Вот форма:<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&#60;form method=&quot;post&quot; name=&quot;mform&quot; id=&quot;mff6lXsd&quot; style=&quot;margin:0&quot; &nbsp;onsubmit=&quot;fun6lXsd();return false;&quot;&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#60;input type=&quot;hidden&quot; name=&quot;jkd498&quot; value=&quot;1&quot;&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#60;input type=&quot;hidden&quot; name=&quot;jkd428&quot; value=&quot;1&quot;&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#60;table border=&quot;0&quot; width=&quot;100%&quot; id=&quot;table1&quot; cellspacing=&quot;1&quot; cellpadding=&quot;2&quot;&#62;</div><div class="code_line">&#60;tr&#62;&#60;td width=&quot;35%&quot;&#62;Имя отправителя &#60;font color=&quot;red&quot;&#62;*&#60;/font&#62;:&#60;/td&#62;&#60;td&#62;&#60;input type=&quot;text&quot; name=&quot;f4&quot; size=&quot;30&quot; style=&quot;width:95%;&quot; maxlength=&quot;70&quot;&#62; &#60;/td&#62;&#60;/tr&#62;</div><div class="code_line">&#60;tr&#62;&#60;td&#62;E-mail отправителя &#60;font color=&quot;red&quot;&#62;*&#60;/font&#62;:&#60;/td&#62;&#60;td&#62;&#60;input type=&quot;text&quot; name=&quot;f1&quot; size=&quot;30&quot; style=&quot;width:95%;&quot; maxlength=&quot;70&quot;&#62; &#60;/td&#62;&#60;/tr&#62;</div><div class="code_line">&#60;tr&#62;&#60;td&#62;Web-site:&#60;/td&#62;&#60;td&#62;&#60;input type=&quot;text&quot; name=&quot;f5&quot; size=&quot;30&quot; style=&quot;width:95%;&quot; maxlength=&quot;70&quot;&#62; &#60;/td&#62;&#60;/tr&#62;</div><div class="code_line">&#60;tr&#62;&#60;td&#62;Тема письма:&#60;/td&#62;&#60;td&#62;&#60;input type=&quot;text&quot; name=&quot;f2&quot; size=&quot;30&quot; style=&quot;width:95%;&quot; maxlength=&quot;70&quot;&#62; &#60;/td&#62;&#60;/tr&#62;</div><div class="code_line">&#60;tr&#62;&#60;td&#62;Текст сообщения &#60;font color=&quot;red&quot;&#62;*&#60;/font&#62;:&#60;/td&#62;&#60;td&#62;&#60;textarea rows=&quot;7&quot; name=&quot;f3&quot; cols=&quot;30&quot; style=&quot;width:95%;&quot;&#62;&#60;/textarea&#62; &#60;/td&#62;&#60;/tr&#62;</div><div class="code_line">&#60;tr&#62;&#60;td&#62;Оценка сайта:&#60;/td&#62;&#60;td&#62;&#60;select size=&quot;1&quot; name=&quot;f6&quot;&#62;&#60;option&#62;Отлично&#60;/option&#62; &#60;option&#62;Хорошо&#60;/option&#62; &#60;option&#62;Неплохо&#60;/option&#62; &#60;option&#62;Плохо&#60;/option&#62; &#60;option&#62;Ужасно&#60;/option&#62;&#60;/select&#62;&#60;/td&#62;&#60;/tr&#62;</div><div class="code_line">&#60;tr&#62;&#60;td&#62;Код безопасности &#60;font color=&quot;red&quot;&#62;*&#60;/font&#62;:&#60;/td&#62;&#60;td&#62;&#60;input type=&quot;text&quot; name=&quot;f7&quot; size=&quot;6&quot; maxlength=&quot;5&quot;&#62; &#60;input type=&quot;hidden&quot; name=&quot;seckey&quot; value=&quot;1618199207204069181&quot; /&#62;&#60;img alt=&quot;&quot; style=&quot;margin:0;padding:0;border:0;cursor:pointer;&quot; id=&quot;secuImgM&quot; align=&quot;absmiddle&quot; title=&quot;Обновить код безопасности&quot; onclick=&quot;this.src=&#39;http://sfgbsdfgjhfbhdg.ucoz.ru/secure/?k=1618199207204069181;s=mail;tm=&#39;+Math.random();&quot; src=&quot;http://sfgbsdfgjhfbhdg.ucoz.ru/secure/?k=1618199207204069181;s=mail;tm=1392066603&quot; /&#62;&#60;/td&#62;&#60;/tr&#62;</div><div class="code_line">&#60;tr&#62;&#60;td colspan=&quot;2&quot; align=&quot;center&quot;&#62;&#60;br /&#62;&#60;input type=&quot;submit&quot; value=&quot;Отправить сообщение&quot;&#62;&#60;/td&#62;&#60;/tr&#62;</div><div class="code_line">&#60;/table&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#60;input type=&quot;hidden&quot; name=&quot;id&quot; value=&quot;1&quot; /&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#60;input type=&quot;hidden&quot; name=&quot;a&quot; value=&quot;1&quot; /&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#60;input type=&quot;hidden&quot; name=&quot;o&quot; value=&quot;1&quot; /&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#60;/form&#62;</div></ol></div></div></div></div><br>
<br>
<br>
Вот функция, которая вызывается перед самой отправкой запроса:<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">function fun6lXsd() {</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var act=&#39;/mail/&#39;, upref=&#39;3K16w1wcWRZ&#39;, uploadId, wnd;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;try { var tr=checksubmit(); if(!tr){return false;} } catch(e) {}</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(sblmb1==1) { return false; }</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sblmb1=1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;window._uploadIdx = window._uploadIdx ? window._uploadIdx+1 : 1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;uploadId = &#39;up&#39; + window._uploadIdx + &#39;_&#39; + upref;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var frm = $(&#39;#mff6lXsd&#39;)[0];</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;frm.action=act+&#39;?upsession=&#39;+uploadId;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;wnd = new _uWnd(</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#39;sendMFe1&#39;,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#39;Отправка сообщения&#39;,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-350,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-100,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;footerh:25,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;footerc:&#39; &#39;,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;autosize:0,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;modal:1,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;closeonesc:1,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;resize:0,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;hidefooter:0,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;contentsizeprio:0,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;onbeforeclose:function(){},</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;onclose:function(wnd){</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(wnd._myuploadTimer) clearTimeout(wnd._myuploadTimer);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;wnd._myuploadTimer=null;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;},</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;form:frm</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;wnd._myuploadStarted=0;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;_uploadCheck.call({upload_wnd:wnd.idx,upload_id:uploadId});</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</div></ol></div></div></div></div><br>
<br>
Можно ли как то не используя веббраузер обработать это событие? POST запрос не отправляется если функция не вернет ответ, проверка корректности заполнения формы. Вернее он отправляется, но без вызова функции сервер отдает ответ Connection = CLOSE.]]></description>
        <author>Serzant</author>
        <category>Delphi: Сетевое программирование</category>
      </item>
	
      </channel>
      </rss>
	