如何调试 javascript:WebForm_DoPostBackWithOptions?

发布于 2024-12-11 00:32:43 字数 390 浏览 0 评论 0原文

在我的页面上此链接不起作用。

<a id="dnn_ctr1587_EditEventsCalendar_cmdUpdateReturn" title="Update &amp; Return" class="CommandButton" href='javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("dnn$ctr1587$EditEventsCalendar$cmdUpdateReturn", "", true, "", "", false, true))'>Update &amp; Return</a>

如何调试以找出哪个字段阻止此代码提交,以便修复该错误?

On my page this link isn't working.

<a id="dnn_ctr1587_EditEventsCalendar_cmdUpdateReturn" title="Update & Return" class="CommandButton" href='javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("dnn$ctr1587$EditEventsCalendar$cmdUpdateReturn", "", true, "", "", false, true))'>Update & Return</a>

How do I debug to figure out what field is stopping this code from submitting so I can fix the bug?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

烟雨凡馨 2024-12-18 00:32:43

Chrome 最适合我:

  1. 我点击了右上角的扳手。
  2. 我去了工具 --> JavaScript 控制台
  3. 源代码视图上方是一个列出文件的下拉列表。我在每个文件中搜索了 WebForm_DoPostBackWithOptions (我必须在每个文件的搜索框中按 Enter 才能刷新搜索结果)
  4. 它最终在 ScriptResource.axd 第 29 行返回 false。我查看了监视窗口,能够看到引发错误的控件的名称。

PS 最初我尝试使用 FireFox 进行调试。 JavaScript 将所有内容显示在一行上。 Chrome 很好地缩进了它,这样我就可以知道发生了什么。

Chrome worked best for me:

  1. I clicked the wrench in the upper right.
  2. I went to tools --> JavaScript Console
  3. Above the sourcecode view is a dropdown listing files. I searched through each file for WebForm_DoPostBackWithOptions (I had to hit enter in the search box on each file to get the search results to refresh)
  4. It ended up in ScriptResource.axd line 29 was returning false. I looked in the watch window and was able to see the name of the control firing the error.

P.S. initially I tried debugging with FireFox. The javaScript was showing all on one line. Chrome showed it nicely indented so I could tell what was going on.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文