Добрый день!
Если в чанк вставить JavaScript - он будет работать? Просто есть скрипт подписки на новости сайта (SR-Subscribe), в нем код, который вставляется в шаблон страницы. Хочу вытащить его из шаблона и вставить назад через чанк. Код такой
<script language="JavaScript">
<!--
function win()
{
subscribe=window.open("","subscribe","width=300,height=200,top=0,left=0,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no");
subscribe.document.open();
subscribe.document.write("<html><head><title>SR Subscribe v1.0</title><style> a:link {font-size: 11px; color: #6060B0; font-weight: normal; text-decoration: none} a:visited {font-size: 11px; color: #6060B0; font-weight: normal; text-decoration: none} a:active {font-size: 11px; color: #6060B0; font-weight: normal; text-decoration: none} a:hover {font-size: 11px; color: #000000; font-weight: normal; text-decoration: none}</style></head><body topmargin='0' leftmargin='0' marginwidth='0' marginheight='0'><table width='300' height='200' border='0' cellspacing='0' cellpadding='0'><tr><td height='180' align='center' valign='middle' style='font-family:Verdana;font-size:11px;'>Идет подписка, ждите...</td></tr><tr><td height='20' align='center' valign='middle'><a href='http://www.sad-raven.ru/' target='_blank'><font style='font-family:Verdana;font-size:9px;color:#CCCCCC'>SR Subscribe v1.0 © 2002</font></a></td></tr></table></body></html>");
subscribe.document.close();
document.sr_subscribe.submit();
}
//-->
</script>
<form action="http://мой сайт/subscribe.php" method="POST" name="sr_subscribe" target="subscribe">
<table border="0" bgcolor="#cccccc" cellspacing="1" cellpadding="1" width="160">
<tr style="font-family:Verdana;font-size:11px;">
<td bgcolor="#E8E800" colspan="2" align="center">
Подпишись на новости сайта!
</td>
</tr>
<tr>
<td bgcolor="#FFFFFF" align="center">
<input type="text" name="mail" size="16" value="Ваш e-mail" style="font-family:Verdana;font-size:11px;">
</td>
<td bgcolor="#FFFFFF" align="center">
<input type="button" onClick="javascript:win();" value="OK" style="font-family:Verdana;font-size:11px;">
</td>
</tr>
</table>
</form>
Или этот код лучше через сниппет (ведь обработка информации)?
Спасибо заранее!