var intervals = [];
//
//Load each widget
//
@foreach (var widget in Model.Widgets.OrderBy(p => p.OrderSequence).ThenBy(p => p.Title).ToList())
{
@:loadWidget("@widget.WidgetId", "@widget.AjaxUrl");
if (widget.RefreshSeconds > 0)
{
@:setupWidgetAutoRefresh("@widget.WidgetId", "@widget.AjaxUrl", @widget.RefreshSeconds);
}
}
I need to store the return value from the setupWidgetAutoRefresh method into my Javascript intervals array. Is it possible for me to do so? How would I go about completing such a task?
var intervals = [];
//
//Load each widget
//
@foreach (var widget in Model.Widgets.OrderBy(p => p.OrderSequence).ThenBy(p => p.Title).ToList())
{
@:loadWidget("@widget.WidgetId", "@widget.AjaxUrl");
if (widget.RefreshSeconds > 0)
{
@:intervals.push(setupWidgetAutoRefresh("@widget.WidgetId", "@widget.AjaxUrl", @widget.RefreshSeconds));
}
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.