我有一个控制器:
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>
然后OpenScormModuleWindow:
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]; }
我搜索了这个代码,但没有找到它
有人可以帮忙吗? 谢谢