Amitesh, Please start a new thread with a new subject rather than appending your question to someone else's thread. I've changed the title for you this time.
On Wed, Aug 12, 2015 at 1:26 AM, amitesh sharma <siprusha...@gmail.com> wrote: > guide me how can i resolve this issue. > > Amitesh kumar sharma > Noida Uttar Pradesh > > On Wed, Aug 12, 2015 at 11:49 AM, amitesh sharma <siprusha...@gmail.com> > wrote: > >> Hello >> >> As per message i tried to run tis code like: >> >> <!DOCTYPE html> >> <html> >> <head> >> <title>Super-Simple JSmol</title> >> <meta charset="utf-8"> >> <script type="text/javascript" src="js/JSmol.min.js"></script> >> > In all of my pages JSmol.min.js is not in the js/ subdirectory. So my pages look like this: <script type="text/javascript" src="JSmol.min.js"></script> but perhaps you moved it there. > <script type="text/javascript"> >> $(document).ready(function() { >> >> Info = { >> width: 400, >> height: 400, >> debug: false, >> j2sPath: "j2s", >> color: "0xC0C0C0", >> disableJ2SLoadMonitor: true, >> disableInitialConsole: true, >> addSelectionOptions: true, >> serverURL: " >> http://chemapps.stolaf.edu/jmol/jsmol/php/jsmol.php", >> use: "HTML5", >> readyFunction: null, >> script: "load $caffeine" >> } >> >> >> $("#mydiv").html(Jmol.getAppletHtml("jmolApplet0",Info)) >> > I forgot -- this is no longer necessary: > Jmol.setDocument(0); >> > just this: > var s = Jmol.jmolLink(jmolApplet0, "spin on", "spin on") >> + " " + Jmol.jmolLink(jmolApplet0, "spin off", "spin off") >> + " " + Jmol.jmolCheckbox(jmolApplet0, "spin on", "spin off", >> "toggle spin") >> $("#buttondiv").html(s) >> }); >> >> >> >> </script> >> </head> >> <body> >> <span id=mydiv></span> >> <span id=buttondiv></span> >> > ------------------ sorry - forgot to mention that this next part, then, is not necessary: > <a href="javascript:Jmol.script(jmolApplet0, 'spin on')">spin on</a> >> >> <a href="javascript:Jmol.script(jmolApplet0, 'spin off')">spin off</a> >> <script> >> Jmol.jmolCheckbox(jmolApplet0, "spin on", "spin off", "toggle spin") >> </script> >> > --------------------- > </body> >> </html> >> >> So here is a page that runs from the jsmol/ directory: <!DOCTYPE html> <html> <head> <title>Super-Simple JSmol</title> <meta charset="utf-8"> <script type="text/javascript" src="JSmol.min.js"></script> <script type="text/javascript"> $(document).ready(function() { Info = { width: 400, height: 400, debug: false, j2sPath: "j2s", color: "0xC0C0C0", disableJ2SLoadMonitor: true, disableInitialConsole: true, addSelectionOptions: true, serverURL:"http://chemapps.stolaf.edu/jmol/jsmol/php/jsmol.php", use: "HTML5", readyFunction: null, script: "load $caffeine" }; $("#mydiv").html(Jmol.getAppletHtml("jmolApplet0",Info)); var s = Jmol.jmolLink(jmolApplet0, "spin on", "spin on") + " " + Jmol.jmolLink(jmolApplet0, "spin off", "spin off") + " " + Jmol.jmolCheckbox(jmolApplet0, "spin on", "spin off", "toggle spin"); $("#buttondiv").html(s); }); </script> </head> <body> <span id=mydiv></span> <span id=buttondiv></span> </body> </html> > >> >> but still i face problem to run it. >> >> snap shot attached: >> >> >> By the way, this list allows for only short messages. You won't be able to attach images, and it is wise to clip off quoted sections as well. Bob
------------------------------------------------------------------------------
_______________________________________________ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users