[opencms-dev] for developers: errors in JavaScript

Petr Hollay ph at ethikom.de
Mon Jan 26 14:55:02 CET 2004


Hi,

after fixing some errors in JavaScript files used by MSDHTML-based editor in
HEAD and 5_3_1 branches,

I would recommend defining and initializing variables in JavaScript
properly:

 

 "If I need some variable, let's define and initialize it first", instead of
relaying on the browser to handle it. 

 

This approach is commonly used in strongly typed languages like Java,
compared to scripting languages like JavaScript, VBScript etc.

 

Example:

/opencms/webapp/WEB-INF/setupdata/vfs/system/workplace/jsp/editors/msdhtml/m
ainpage.txt

Variable dialogWindow was used without initialization, causing JavaScript
error in MSIE 6.0 (on WinXP, with all latest ServicePacks installed).

 

Best regards

Petr

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20040126/43a331f7/attachment.htm>


More information about the opencms-dev mailing list