Здравтсвуйте!
Взял форму расчета стоимости перевозок ТК, вот их код:
<iframe src="http://www.rateksib.ru/ajax/tarifweb.php" frameborder="0" scrolling='no' id='ratekcalc' style='width:300px' onload="var th=this; setInterval(function() { var h=null;if (!h) if (location.hash.match(/^#h(\d+)/)) {h=RegExp.$1;} if (!h) for (var i=0; i<10000; i+=30) if (top.frames['h'+i]) { h=i; break; } if (h) th.style.height=h+'px';}, 500)"> </iframe>
, а КБ выдает ошибку, видимо Smarty тут не понимает что-то. Подскажите пожалуйста, что тут исправить?
ссылка на источник кода : http://www.rateksib....botchikam/#h510
Ошибка где то в коде
Автор specmash, 15 авг. 2013 11:09
Сообщений в теме: 4
#1
Отправлено 15 Август 2013 - 11:09
#2
Отправлено 15 Август 2013 - 11:19
Ошибка то какая? Уверены что именно ошибка smarty? Smarty обычно ругается на фигурные скобки, т.к. он их использует, но это легко решается пробелами, у вас они есть.
#3
Отправлено 15 Август 2013 - 12:53
Извиняюсь, чет забыл выложить
Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "eval:" on line 20 "<iframe src="http://www.rateksib.ru/ajax/tarifweb.php" frameborder="0" scrolling='no' id='ratekcalc' style='width:300px' onload="var th=this; setInterval(function() { var h=null;if (!h) if (location.hash.match(/^#h(\d+)/)) {h=RegExp.$1;} if (!h) for (var i=0; i<10000; i+=30) if (top.frames['h'+i]) { h=i; break; } if (h) th.style.height=h+'px';}, 500)"> </iframe>" - Unexpected "=", expected one of: "}" , " "' in /home/specmash/public_html/include/Smarty/sysplugins/smarty_internal_templatecompilerbase.php:441 Stack trace: #0 /home/specmash/public_html/include/Smarty/sysplugins/smarty_internal_templateparser.php(2889): Smarty_Internal_TemplateCompilerBase->trigger_template_error() #1 /home/specmash/public_html/include/Smarty/sysplugins/smarty_internal_templateparser.php(2954): Smarty_Internal_Templateparser->yy_syntax_error(19, '=') #2 /home/specmash/public_html/i in/home/specmash/public_html/include/Smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 441
Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "eval:" on line 20 "<iframe src="http://www.rateksib.ru/ajax/tarifweb.php" frameborder="0" scrolling='no' id='ratekcalc' style='width:300px' onload="var th=this; setInterval(function() { var h=null;if (!h) if (location.hash.match(/^#h(\d+)/)) {h=RegExp.$1;} if (!h) for (var i=0; i<10000; i+=30) if (top.frames['h'+i]) { h=i; break; } if (h) th.style.height=h+'px';}, 500)"> </iframe>" - Unexpected "=", expected one of: "}" , " "' in /home/specmash/public_html/include/Smarty/sysplugins/smarty_internal_templatecompilerbase.php:441 Stack trace: #0 /home/specmash/public_html/include/Smarty/sysplugins/smarty_internal_templateparser.php(2889): Smarty_Internal_TemplateCompilerBase->trigger_template_error() #1 /home/specmash/public_html/include/Smarty/sysplugins/smarty_internal_templateparser.php(2954): Smarty_Internal_Templateparser->yy_syntax_error(19, '=') #2 /home/specmash/public_html/i in/home/specmash/public_html/include/Smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 441
#4
Отправлено 15 Август 2013 - 13:14
Цитата
{h=
Здесь пробел забыли.
#5
Отправлено 15 Август 2013 - 13:32
CbCoder (15 Август 2013 - 13:14) писал:
Здесь пробел забыли.
Ошибку больше не выдает, но теперь ничего не происходит, как будто я никакой код и не вставлял, хотя пробовал его HTML файле запустить - работает
Проверил в новом, пустом представлении - работает, значит что-то надо править
Сообщение отредактировал specmash: 15 Август 2013 - 13:35
Количество пользователей, читающих эту тему: 2
0 пользователей, 2 гостей, 0 анонимных













