Prototype Javascript Library Won't Save

Hi,

I used to use Prototype as a javascript library resource quite happily in 6.5. However, when I try to create a new javascript scriptlibrary in 7.02 containing Prototype it won’t save and gives the following error message. “Test for equality (==) mistyped as assignment (=)?”

This is given from the following line of code from around about the middle of the prototype library.

if (match = source.match(pattern)) {

Now while the line of code does seem to contain the error the Notes Designer is complaining about in this case its been done deliberatly and is quite legal javascript. Does anyone know how I can get this to save? Is it possible to turn off the Lotus Designers attempts to error check javascript as it is clearly too sensitive to what is an error …

Subject: Prototype Javascript Library Won’t Save

No way that I know of, to disable the JS editor’s syntax checking.

If you don’t feel like rewriting the notation used in this version of prototype, a good solution could be to add the library file(s) to your server’s HTML folder. The obvious downside is, that you have to manage this additional dependency on all servers. On the other side, Prototype will be available to all apps on a server immediately.

Subject: or add it as a file resource instead of a JS library

Subject: RE: or add it as a file resource instead of a JS library

The other options would be to store it as an attachment to a page or as an attachment in a configuration document. Since prototype is a single file distribution, these methods should all work equally well.

The one downside, that all alternatives have in common, is that you loose the ability to right-click → insert resource in the HTML head content. But this isn’t necessarily the best option anyway.

Subject: RE: or add it as a file resource instead of a JS library

I added it as a file resource. Hey ho.

After a bit of examination I found it’s the new Prototype 1.6 distribution that seems to have the problem. All the others upload fine.