简体   繁体   English

如何正确调试和确定IE中js错误的javascript / ajax根本原因

[英]How to properly debug and determine javascript/ajax root cause of a js error in IE

Site (url) is here: http://www.icrm.org/career-opportunities/ 网站(URL)在这里: http : //www.icrm.org/career-opportunities/

This shows a table in which the column headers are clickable (they sort) and the column Career Title entries are all clickable - they lead to a details screen that shows more. 这显示了一个表,在该表中可单击列标题(对它们进行排序),在列“ 职业标题”条目中全部都可单击-它们导致显示更多信息的详细信息屏幕。

This works well (formatting issues aside) in all browsers except IE 在除IE之外的所有浏览器中,这都可以很好地工作(排除格式问题)

What is bizarre is that in IE only the first link in the list of Titles does't work (Electronic Records Manager Structured). 奇怪的是,在IE中,只有“标题”列表中的第一个链接不起作用(“电子记录管理器”结构化)。 Yet you can see the call is identical to every other title when you mouse over it. 但是,将鼠标悬停在该标题上时,您会看到该呼叫与其他所有标题相同。 All the other links work fine. 所有其他链接都可以正常工作。

When the list is re-sorted the problem "follows" the link in question NOT staying associated with the (new) first link. 重新排序列表后,问题将“关注”所关注的链接,该链接不会与(新)第一个链接保持关联。

This rules out positionally as the root cause however I've also changed the title of the item in question enough times to eliminate anything that the text contains. 这排除了由于位置上的根本原因,但是我也已经改变了问题足够次项目的标题,以消除任何文本包含。

My question is where do I go from here? 我的问题是我从这里去哪里? Every platform I use for development the problem doesn't manifest. 我用于开发的每个平台都没有发现问题。

So if you open this up in IE dev tools (hit F12) you can monitor the network traffic and see what is going on behind the scenes. 因此,如果您在IE开发工具中打开它(按F12键),则可以监视网络流量并查看幕后情况。 When you click "Electronic Records Manager Structured" the following executes successfully: javascript:fetchRemoteData(null,"&column=Title&rowID=1114"). 当您单击“结构化电子记录管理器”时,以下命令将成功执行:javascript:fetchRemoteData(null,“&column = Title&rowID = 1114”)。 This results in a successful network request and response containing: 这将导致成功的网络请求和响应包含:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<JobPostings columns="19" method="DisplayAJobPost" rows="1">
   <JobPosting row="0">
      <ID>1114</ID>
      <ApprovedPublic>Y</ApprovedPublic>
      <Status>Approved</Status>
      <Title>Electronic Records Manager Structured</Title>
      <Location>Rosemead, California United States Of America</Location>
      <Company>Southern California Edison</Company>
      <CRMQualifications>CRM Preferred</CRMQualifications>
      <Requirements/>
      <Description>Highly-motivated; like challenge; &#13;
collaborative; committed to delivering &#13;
high quality workÉ Did we describe &#13;
you? Read onÉ&#13;
 &#13;
Southern California Edison is one of &#13;
the nation?s largest investor-owned &#13;
electric utilities. We are an industry &#13;
leader that is designing new and &#13;
innovative ways to meet our &#13;
...

This too me looks to all be behaving normally and correctly. 我也希望这一切都能正常且正确地进行。 However, when your application then goes to try and display this on the page: 但是,当您的应用程序随后尝试将其显示在页面上时:

SCRIPT5007: Unable to get property 'documentElement' of undefined or null reference File: api.js, Line: 421, Column: 4. SCRIPT5007:无法获取未定义或空引用文件的属性'documentElement':api.js,行:421,列:4。

and

XML5617: Illegal XML character. XML5617:非法的XML字符。 Line: 14, Column 18 第14行,第18列

I suspect this is because the XML that you are returning for that specific record is invalid. 我怀疑这是因为针对该特定记录返回的XML无效。 Start there, hopefully that helps! 从那里开始,希望能有所帮助!

I am not sure of this but it seems there are some not compatible characters returned in you response for Electronic Records Manager Structured . 我不确定这一点,但您似乎在响应中返回了一些不兼容的字符,这是针对电子记录管理器的结构化的 Can you check if you don't have any character which does not fall under this given charset , if you do have any invalid charater then your element returned from techanoReq.responseXML.documentElement will be null. 您是否可以检查是否没有不属于此给定字符集的字符 ,如果您有任何无效字符 ,那么从techanoReq.responseXML.documentElement返回的元素将为null。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM