Collections:
JS Loading Error - JSME Instance Named as "jsme"
Why I am getting the JavaScript file loading error, if I name the JSME Instance Named as "jsme"?
✍: FYIcenter.com
"jsme" is used in JSME JavaScript code for another object.
If you use it to name your new JSME object, it will override the other object
and cause JavaScript loading errors.
1. Follow the previous tutorial to install JSME on your Web server.
2. Create a new HTML document, editor-error.html, with JSME object named as "jsme".
<html> <head> <title>My JSME Editor - .js Loading Error</title> <script type="text/javascript" src="/jsme/jsme.nocache.js"></script> <script> function jsmeOnLoad() { // naming JSME object as "jsme" causing problems jsme = new JSApplet.JSME("jsmeID", "380px", "340px"); } </script> </head> <body> <p>Hello, please try the JSME molecule editor below:</p> <div id="jsmeID"></div> </body> </html>
3. Copy editor-error.html to the Apache Web server where JSME was installed:
fyicenter$ sudo cp editor-error.html /var/www/html/jsme
4. Test JSME editor page on the Apache Web server by opening "http://localhost/jsme/editor-error.html" URL in a Web browser.
5. Select the "benzene ring" icon from the JSME editor menu and click a location inside the editor. You see a benzene ring molecule created.
6. Select the "export & import" icon from the menu and select "Copy as SMILES". You see nothing displayed.
7. Open browser's JavaScript Console window. For example, select "Develop > Show JavaScript Console" menu on Safari. You see a number of JavaScript loading errors:
Failed to load resource: ... http://localhost/jsme/undefineddeferredjs/....js ...
To fix the problem, modify "editor-error.html" and rename the JSME object with "jsmeObj" instead of "jsme"./
⇒ Migrate JME Applet to JSME JavaScript
2020-05-18, 704👍, 0💬
Popular Posts:
How to split a file with a large number of molecules? You can split a file with a large number of mo...
How to add hydrogen atoms to molecule data during data conversion? Most molecules contains many hydr...
What Is Stereochemistry? Stereochemistry is the study of stereoisomers, which are molecules having s...
How many command line tools are provided in the Open Babel package? By default, Open Babel package p...
What is ebi.ac.uk ChEMBL Compound Database? ebi.ac.uk ChEMBL Compound Database contains about 2,000,...