I have a controller:
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" });
}
then Detail.aspx file where i call a javascript function:
<div class="col3">
<a id="training-launch-button" href='javascript:OpenScormModuleWindow("<%: ViewBag.ScormModuleUrl %>", <%: ViewBag.title %>, <%: ViewBag.WindowWidth %>, <%: ViewBag.WindowHeight %>);' class="button">Launch</a>
</div>
Then 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"
I never get the output of console.log(trainingModuleUrl);
when i hit the launch button i get the error in question and it point to some weird line that is nowhere in my code?
var _waxArr; var o = document.getElementById('cosymantecbfw');
o.addEventListener('waxSetArr', function(evt) { _waxArr = evt.detail; });
function waxGetElement(i) { return _waxArr[i]; }
i searched for this code but does not find it
can someone help please?
thanks
Does your title have any spaces?
If it does, try this