@3axap_90

Почему калькулятор перестал работать?

На сайте перестал работать калькулятор, с чем связано не могу понять
Консоль выдает ошибку
"zabory-i-vorota.html:33 Uncaught SyntaxError: Unexpected end of input"

Помогите разобраться и исправить ошибку!

вот код:
<script type="text/javascript">
	jQuery(document).ready(function() {
		var pathCalt = '<?if($_SERVER['REQUEST_URI'] == '/zabory-i-vorota.html'):?>calculate<?else:?>calculate/manager<?endif?>';

		jQuery.ajax({
		  url: "/templates/tsikoliya_green/"+pathCalt+"/calc_main.php",
		}).done(function(data) {
			var price = deckingPrices;
			jQuery('.calc_result').html(data);
		});

		jQuery('.init_link a').on('click', function(e) {
			var file = jQuery(this).data('file');

			var i = 'calc_'+file+'.php';
			jQuery.ajax({
			  url: "/templates/tsikoliya_green/"+pathCalt+"/"+i,
			}).done(function(data) {
				console.log(file);
				if(file == 'main') {
					price = deckingPrices;	
				}
				if(file == 'two_f') {
					price = rabitzPrices;	
				}
				if(file == 'two_t') {
					price = meshInFramePrices;	
				}
				if(file == 'two_p') {
					price = eurofencePrices;	
				}


				jQuery('.calc_result').html(data);
			});

			e.preventDefault();
		});
	});
</script>
  • Вопрос задан
  • 99 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы