trash-box
Junior Member
Posts: 2
Registered: 2/18/2006
Member Is Offline
|
| posted on 2/18/2006 at 01:30 AM |
|
|
Errors with Calendar PRO in combination with script.aculo.us
hi i'm using calendar pro the first time. for visual effects, drag'n'drop i use the script.aculo.us library (http://script.aculo.us). each for it self works fine. on one page i can create a nice calendar on the other page i have
wunderful effects with script.aculo.us. but when i put them together, the calendar won't work... the javascript-console tells about:
| Code: |
Error: unterminated regular expression literal
Sourcefile: calendar.js
Row: 12
SourceCode: /function (iterator) {
|
I know that script.aculo.us uses the Prototype Javascript library from http://prototype.conio.net
Can anybody help me?
thx
|
|
|
rd
Newbie
Posts: 1
Registered: 11/6/2006
Member Is Offline
|
| posted on 11/6/2006 at 10:28 AM |
|
|
Hello,
I'm a little late on this one, but I've experienced the same problem, so I hope my reply will help.
Actually the issue is that Tigra Calendar is using a "for (foo in bar)" construction over an Array, which is not supposed to be the way to iterate
over an array.
That error happens when they try to match the date (iirc) against a list of patterns stored in an Array, one by one.
Prototype extends the Array object with a few other methods, and since the for (... in ...) loops over all methods of an object, it will try at some
time to eval "/function (iterator) {....}", which returns an error.
The fix would be to stop using the for/in loop on Arrays but use the index instead, or to store such "arrays" in objects instead.
Regards,
Renaud Drousies
|
|
|
|