这是什么意思:SCRIPT1006:预期为')' [英] what does this mean: SCRIPT1006: Expected ')'

查看:108
本文介绍了这是什么意思:SCRIPT1006:预期为')'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个控制器:

 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函数:

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>

然后打开OpenScormModuleWindow:

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"

我从没得到console.log(trainingModuleUrl);的输出 当我按下启动按钮时,我得到了有问题的错误,它指向我的代码中没有的怪异行?

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

推荐答案

您的标题是否有空格?

如果有,请尝试

<div class="col3">
    <a id="training-launch-button" href='javascript:OpenScormModuleWindow("<%:ViewBag.ScormModuleUrl %>", "<%:  ViewBag.title %>", <%:  ViewBag.WindowWidth %>, <%:  ViewBag.WindowHeight %>);' class="button">Launch</a>
</div>

这篇关于这是什么意思:SCRIPT1006:预期为')'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆