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, 1009🔥, 0💬
Popular Posts:
Why "babel ... -o svg -xP300" command is not able scale a molecule SVG image? The "babel ... -o svg ...
Molecule Summary: ID: FYI-1001811 SMILES: CC(C)(C1=CC=CC=C1)C2=CC( =C(C(=C2)N3N=C4C=CC=CC4= N3)O)C(C)(...
Molecule Summary: ID: FYI-1001106 SMILES: [Mo@](/[P]=N\\[CH2])(P1( N(C)CCN1C)OC)([C][O])[CH ][CH].[Mo@...
Molecule Summary: ID: FYI-1003319 Names: InChIKey: HNYDBQGLNHGEHA-UHFFFAOYS A-NSMILES: Cc2nc(c1ccc(O...
Molecule Summary: ID: FYI-1001162 SMILES: CCCCn1c(n[nH]c1=S)Cc1ccc (cc1)OCCReceived at FYIcenter.com...