23 August 2007

Fixing yui menu.js error in IE (Internet Explorer)

While developing an application for a client that employs the YUI (Yahoo User Interface - http://developer.yahoo.com/yui/) tools, I found that the menu I built that runs in Firefox caused an IE script error.

After going through the mission of trying to find how to debug IE javascript (because IE lacks a decent built in debugger), I eventually got Visual Studio to debug the error.

The actual error returned is "Error: Object required".

To fix this, take the following steps.


  1. Open yui/build/menu/menu.js
  2. Goto line 1482 (or the line that says while((oNode = oNode.nextSibling));
  3. change the line to: while(oNode && (oNode = oNode.nextSibling));
This should get rid of the error !

Labels:

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home