Recently, the Calendar5 js calendar control has been widely used in projects. It works normally in IE6, IE7, and chrome and FF, however, in IE8, if you click the scroll bar on the right, a script error prompt will pop up: "The object does not support this attribute or method." No solution is available on the Internet.
At last, I am not familiar with js programming and debugged to rewrite the 459th lines in the Calendar5.js source file (different source files are slightly deviated) to solve this problem.
Original code:
[Javascript]
// Drag the calendar to start
Function dragStart (evt ){
Evt = evt | window. event;
Var _ target = evt.tar get | evt. srcElement;
If (_ target. getAttribute ("Author") = "alin_bar ")
{
DragObj = getObjById ("Calendar ");
MouseOffset = getMouseOffset (dragObj, evt );
}
}
Improved code:
[Javascript]
Function dragStart (evt ){
Evt = evt | window. event;
Var _ target = evt.tar get | evt. srcElement;
If (_ target. nodeName! = Undefined) & _ target. getAttribute ("Author") = "alin_bar ")
{
DragObj = getObjById ("Calendar ");
MouseOffset = getMouseOffset (dragObj, evt );
}
}
This article provides reference to colleagues who are not familiar with JS programming but are troubled by this problem.