| Новости | FAQ | Авторы | Документация | В действии | Библиотека |
| Инструменты | Полезные ссылки | Хостинги | Скачать | Примеры | Форум |
Oleg 10.07.2003 14:32
Я пишу@show_form[]
<form method="POST" action="/forum/add_message.html">
<input name="forum_id" type="hidden" value="^if(def form:forum){$form:forum}{0}" />
<input name="tred" type="hidden" value="^if(def $form:tred){$form:tred}{0}" />
<input name="parent_id" type="hidden" value="^if(def $form:id){$form:id}{0}" />
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
^if(def $cookie:login_name){}{
<tr>
<td width="20%" align="left" valign="baseline">Автор: <input name="author" /></td>
</tr>
<tr>
<td width="20%" align="left" valign="baseline">E-mail: <input name="email" /></td>
</tr>}
<tr>
<td width="20%" align="left" valign="baseline">Тема: <input name="title" /></td>
</tr>
<tr>
<td align="left" valign="baseline">
Текст сообщения:<br />
<textarea cols="60" name="text" rows="6"></textarea><br /><br />
<center>
<input type="submit" value="Отправить сообщение" name="post"/>
<input type="reset" value="Очистить" /></center></td>
</tr>
</form>
</table>Он работает (в смысле передаёт данные на сервер)@show_form[]
<form method="POST" action="/forum/add_message.html">
<input name="forum_id" type="hidden" value="^if(def form:forum){$form:forum}{0}" />
<input name="tred" type="hidden" value="^if(def $form:tred){$form:tred}{0}" />
<input name="parent_id" type="hidden" value="^if(def $form:id){$form:id}{0}" />
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
^if(def $cookie:login_name){}{
<tr>
<td width="20%" align="left" valign="baseline">Автор: <input name="author" /></td>
</tr>
<tr>
<td width="20%" align="left" valign="baseline">E-mail: <input name="email" /></td>
</tr>}
<tr>
<td width="20%" align="left" valign="baseline">Тема: <input name="title" /></td>
</tr>
<tr>
<td align="left" valign="baseline">
Текст сообщения:<br />
<textarea cols="60" name="text" rows="6"></textarea><br /><br />
<center>
<input type="submit" value="Отправить сообщение" name="post" onClick="
window.opener.location.href = '/forum/message.html?tred=$form:tred';
window.opener.focus();
window.close();" />
<input type="reset" value="Очистить" /></center></td>
</tr>
</form>
</table>Обновляет родительское окно, закрывает само себя но данные на сервер не передаёт.