PE's Implementation for Netscape 7, Mozilla, Firefox
(the Gecko family of browsers)

A document for Protein Explorer (PE).

The Gecko family of browsers includes Netscape 7 (netscape.com), Mozilla (mozilla.org), and Firefox (getfirefox.com). These browsers use a common layout engine named Netscape Gecko. All are developed in the open source community of mozilla.org (see Mozilla Licencing Policies and open source faq).

Heartfelt thanks are due to Enrique Castro (EC) who solved the key compatibility issues between Protein Explorer and the Gecko family of browsers. Eric Martz built upon Castro's work to release Gecko-compatible PE.

  1. Installing Chime

    1. The MDL Chime Installer does not recognized Gecko browsers as supported, and fails to install Chime in them. Therefore, manual installation is required.

    2. After installation the browser must be closed and restarted. Then, all Gecko browsers report the presence and version of the Chime plugin in Help, About Plugins.

  2. Testing Chime Function

    1. The browser should hand files of MIME chemical/x-pdb to Chime. This can be tested by clicking on a pdb file URL for a properly configured server, such as atp.pdb. The browser window should turn black (Chime's default background color), the logo "MDL" should appear in the lower right corner, and a wireframe display of the ATP molecule should appear. This works in Mozilla and Firefox but curiously fails in Netscape 7.2.

    2. Similarly, the browser should hand files of MIME chemical/x-spt to Chime. This can be tested by clicking on a pdb file URL for a properly configured server, such as atp.spt. The browser window should turn black (Chime's default background color), the logo "MDL" should appear in the lower right corner, and a spacefilling display of the ATP molecule should appear. This works in Mozilla and Firefox but curiously fails in Netscape 7.2.

    3. A simple invocation of Chime with an EMBED tag, specifying a source file of MIME type chemical/x-pdb, loads Chime and displays the specified PDB file correctly in all 3 Gecko browsers. An example is here (as part of Programming Chime Web Pages from Scratch). Protein Explorer previously used this mechanism for initializing Chime (loading an initially invisible file 1atom.pdb, see protexpl/pe_proj.htm), and hence works in all 3 Gecko browsers.

  3. Popup Blocker

    1. PE requires the ability to open (pop-up) new windows in order to work at all.

    2. Firefox makes it easy to allow popups from HTML disk files, while blocking popups from on-line websites. Enabling popups from a downloaded Protein Explorer results in "scheme:file" being shown in the Allowed Sites list. In Netscape 7.2 (rv 1.7.2) and Mozilla, you have to disable all blocking to enable PE to work from downloaded files.

    3. If both Netscape 7.2 and Mozilla 1.7.5 are installed, they share profiles including the popup blocker settings. Thus, if you disable popup blocking in one, it will be disabled in the other (if using the same profile). Firefox's popup blocker settings are independent of Netscape and Mozilla.

  4. Sending Command Script Strings to Chime

    1. PE works by constructing command script strings (as javascript string variables) and sending them to Chime.

    2. Chime includes a built-in executeScript(script) function, but this works only when the browser has LiveConnect. Netscape Communicator 4 has LiveConnect, but the Gecko browsers and Internet Explorer lack it.

    3. In all browsers, command scripts can be sent to Chime using a method called IMBIF (Immediate-Mode Button in Invisible Frame). This method is used by PE in Gecko browsers (shared/s2c2.js, protexpl/morfdoc.js, protexpl/nmr.js).

    4. IMBIF employs an invisible IFRAME (protexpl/pe_proj.htm, protexpl/morfdoc.js, protexpl/nmr.js) which initially contains a blank document. To send a command script, an immediate-mode Chime button is written into the IFRAME document. The method of referring to the IFRAME for the purposes of writing the contained document was changed by EC for Gecko.

  5. Browser Detection and Awareness

    Internally, PE uses top level boolean variables isNetscape4, isIE, isGecko (see shared/browget.js, protexpl/morfdoc.js, protexpl/nmr.js). For isGecko, the top level variable thisBrowser is set to "ns7", "moz", or "ff". Browser compatibility checking is done in protexpl/pe2.htm.


Feedback to Eric Martz.