我有一个控制器:
public ActionResult Detail(string title, string directory)
{
ScormModule module = ZincService.ScormService.GetScormModule(title, directory);
if (module != null)
{
ViewBag.TrainingModuleId = module.ScormModuleId;
ViewBag.ScormModuleUrl = module.RelativeHtmlPath + '/' + module.EntryPointRef;
ViewBag.WindowWidth = module.LaunchWidth;
ViewBag.WindowHeight = module.LaunchHeight;
ViewBag.title = module.Title;
return View(module);
}
else
return RedirectToAction("Index", "Scorm", new { area = "Admin" });
}
然后是 Detail.aspx 文件,我在其中调用 javascript 函数:
<div class="col3">
<a id="training-launch-button" href='javascript:OpenScormModuleWindow("<%: ViewBag.ScormModuleUrl %>", <%: ViewBag.title %>, <%: ViewBag.WindowWidth %>, <%: ViewBag.WindowHeight %>);' class="button">Launch</a>
</div>
然后打开ScormModuleWindow:
function OpenScormModuleWindow(trainingModuleUrl, title, width, height)
{
console.log(trainingModuleUrl);
trainingModuleWindow = window.open(trainingModuleUrl, title, "width=" + width + ", height=" + height);
trainingModuleWindow.focus();
}
ViewBag.ScormModuleUrl = "/SCORM/SellingWindows/a001index.html"
当我点击启动按钮时,我从来没有得到输出,console.log(trainingModuleUrl);
我得到了有问题的错误,它指向了我的代码中没有的一些奇怪的行?
var _waxArr; var o = document.getElementById('cosymantecbfw');
o.addEventListener('waxSetArr', function(evt) { _waxArr = evt.detail; });
function waxGetElement(i) { return _waxArr[i]; }
我搜索了这段代码,但没有找到
有人可以帮忙吗?谢谢