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, 1118🔥, 0💬
Popular Posts:
When Open Babel was first developed? And how many Open Babel releases are there? The original Babel ...
Molecule Summary: ID: FYI-1005521 Names: InChIKey: OEGTUVRTJIQPPJ-UHFFFAOYS A-NSMILES: N#N=NCOC3CC(n...
What are examples of Rotamers? The picture below gives an example of Rotamers: Stereoisomers >...
Molecule Summary: ID: FYI-1006456 Names: InChIKey: NGASABBDYZJAFR-UHFFFAOYS A-NSMILES: Cc1cc(C(C)(C)...
What Is PK (Pharmacokinetic) Related Terminologies? Here are main PK (Pharmacokinetic) related termi...