Javascript Function Undefined but in Source
This music site shows the dreamweaver function MM_timelinePlay as undefined in chrome and firebug, but it is clearly defined in the header. The header is pulled in dynamically, but this should not matter as it has loaded by the time triggers it. The function is called on the hover state of a button labeled开发者_如何学运维 "more."
The code on line 62 is the following (within the function body for MM_initTimelines ): px", "4px");
This is triggering a JavaScript error when the JS is being parsed, which seeing as the MM_timelinePlay is after the parse error, that function is not actually available to the page for use. Not sure what is supposed to be on line 62, but it appears that the line got munched somewhere in the process (perhaps as part of a bad copy and paste, or as part of at bad edit).
You may be able to recover the line by using the else branch of the if statement that line 62 is part of, here it is: document.MM_Time[0][0].values[0] = new Array(-141,-131,-120,-110,-100,-89,-79,-69,-58,-48,-37,-27,-17,-6,4);
Change line 62 to something like the following: document.MM_Time[0][0].values[0] = new Array("-141px","-131px","-120px","-110px","-100px","-89px","-79px","-69px","-58px","-48px","-37px","-27px","-17px","-6px","4px");
Make sure it's all on one line. The edits made were to simply wrap each value of the array with " and then include px. Based on searches for the MM_initTimelines function, the matching line of code (which differs based on the specific movements defined, the true branch of the if statement in your code should match the else except that the values are strings with the px unit added.
As timelines are no longer part of Dreamweaver (removed as of CS5 I think, but maybe earilier), you won't be able to restore or edit the timelines if you are using a newer version of Dreamweaver, so keep the old one around.
精彩评论