External JavaScript
External JavaScript
I transfer through ajax dynamicly value(javascript) of a line
$row[] = '
var timerId = '.$aRow[0].';
var TargetDate['.$aRow[0].'] = "'.$last_time.'";
var NowDate['.$aRow[0].'] = "'.$now_time.'";
var CountActive['.$aRow[0].'] = true;
var CountStepper['.$aRow[0].'] = -1;
var LeadingZero['.$aRow[0].'] = true;
var DisplayFormat['.$aRow[0].'] = "%%H%%:%%M%%:%%S%%";
var FinishMessage['.$aRow[0].'] = "Акция завершена!";
startIt(timerId);
';
respectively it doesn't work (startIt(timerId);)!
What it is necessary to make?
$row[] = '
var timerId = '.$aRow[0].';
var TargetDate['.$aRow[0].'] = "'.$last_time.'";
var NowDate['.$aRow[0].'] = "'.$now_time.'";
var CountActive['.$aRow[0].'] = true;
var CountStepper['.$aRow[0].'] = -1;
var LeadingZero['.$aRow[0].'] = true;
var DisplayFormat['.$aRow[0].'] = "%%H%%:%%M%%:%%S%%";
var FinishMessage['.$aRow[0].'] = "Акция завершена!";
startIt(timerId);
';
respectively it doesn't work (startIt(timerId);)!
What it is necessary to make?
This discussion has been closed.
Replies
I would just make a Javascript function, and let AJAX only give the variables to make the function work.