[ Поиск ] - [ Пользователи ] - [ Календарь ]
Полная Версия: Не подключается скрипт в функции.
Alexandr-sherbakov
И снова здравствуйте великие формучане
ситуация следующая есть функция создания системного сообщения
функция рабочая проверенно.
пытаюсь создать сообщение происходит ошибка. Подскажите пожалуйста 2 день мучаюсь.
<link href="style.css" rel="stylesheet" />
<script
src="messege_window_min.js" ></script>
<script
src="messege_window.js"></script>



function MessageSend($p1, $p2, $p3 = '') {
if ($p1 == 1) $p1 = 'error';
else if ($p1 == 2) $p1 = 'warning';
else if ($p1 == 3) $p1 = 'info';
$messege_window = "<script type= text/javascript > $(function() {

function Toast(type, css, msg) {
this.type = type;
this.css = css;
this.msg = '"
.$p2."';
}

var toasts = [
new Toast('"
.$p1."', 'toast-bottom-right', 'bottom right'),

];

toastr.options.positionClass = 'toast-top-full-width';
toastr.options.extendedTimeOut = 0; //1000;
toastr.options.timeOut = 100000;
toastr.options.fadeOut = 250;
toastr.options.fadeIn = 250;

var i = 0;


delayToasts();


function delayToasts() {
if (i === toasts.length) { return; }
var delay = i === 0 ? 0 : 2100;
window.setTimeout(function () { showToast(); }, delay);

// re-enable the button
if (i === toasts.length-1) {
window.setTimeout(function () {
$('#tryMe').prop('disabled', false);
i = 0;
}, delay + 1000);
}
}

function showToast() {
var t = toasts[i];
toastr.options.positionClass = t.css;
toastr[t.type](t.msg);
i++;
delayToasts();
}
})</script>"
;
$_SESSION['message'] = '<div class="MessageBlock">'.$messege_window.'</div>';

if ($p3) $_SERVER['HTTP_REFERER'] = $p3;
exit(header('Location: '.$_SERVER['HTTP_REFERER']));
}









function MessageShow() {
if ($_SESSION['message'])$Message = $_SESSION['message'];
echo $Message;
$_SESSION['message'] = array();
}
Быстрый ответ:

 Графические смайлики |  Показывать подпись
Здесь расположена полная версия этой страницы.
Invision Power Board © 2001-2024 Invision Power Services, Inc.