I have a page which is showing a javascript error in IE, stating which line the error is on, but the there are so many linked files I have no idea which line of code it is referring to.
Is there a way to find out which line / linked file it is relating to?? I'm sure I could fix the problem if I knew where it was.
Here is the error message from IE...
Message: 'null' is null or not an object
Line: 2231
Char: 5
Code: 0
URI: http://www.hpbtenancies.co.uk/locatio开发者_JAVA技巧n/JF/default.aspx
It happens on the line the error reports.. 2231 on default.aspx
dd.onchange = function(){ link.href = hrefOrig + dd.value;
The detailed error is
dd is null
Use Firefox which has better reporting and also use FireBug for even more flexibility in debugging javascript..
IE 8+ also has improved javascript debugging tools. In the console you will see
SCRIPT5007: Unable to set value of the property 'onchange': object is null or undefined default.aspx, line 2231 character 5
Right-click on the page with the error, click 'View source', scroll down until you reach line 2231 - that's where your error is.
精彩评论