From: Eric G. <egr...@ho...> - 2000-11-02 20:29:37
|
I encountered a rather interesting problem today which in my opnion should not be happening. This is the error message generated by Netscape 4.75. This doesn't occur in IE 5. Only Netscape. JavaScript Error: file:/d%7C/egravel_fl/Amsterdam2000/index.html, line 52: PhotoAlbum is not a constructor. Here's the code: <html> <head> <!-- Include the Dynamic HTML API Object library --> <script language="Javascript" src="../DynAPI/dynapi.js"></script> <script language="Javascript"> <!-- DynAPI.setLibraryPath("../DynAPI/"); DynAPI.include("core.api.dynlayer.js"); DynAPI.include("core.api.browser.js"); DynAPI.include("core.api.dyndocument.js"); DynAPI.include("PhotoAlbum.js", "./"); var PhotoAlbum = null; DynAPI.onLoad = function() { PhotoAlbum = new PhotoAlbum(); PhotoAlbum.setBgColor( "#000000" ); PhotoAlbum.setSize( 200, 200 ); DynAPI.document.addChild(PhotoAlbum); } //--> </script> </head> ... PhotoAlbum.js: function PhotoAlbum() { this.test= 1; return this; } PhotoAlbum.prototype = new DynLayer; If you comment the line "var PhotoAlbum = null;" everything works fine. Why is that? Eric _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. Share information about yourself, create your own public profile at http://profiles.msn.com. |