[Jmol-users] Placing Jmol image in same web page
Hi everyone, I've created a demo page for placing images of the Jmol model into the same web page, drawing upon some ideas and code from Angel Herráez and Dean Edwards. For compliant browsers, the base64-encoded Jmol image is simply directly to an image element; for non-base64 compliant browsers, the decoded image is targeted to an Iframe. I've tested in several browsers (but not Chrome); while the image can be copied and pasted from either type of element; I find that a saved file from the Iframe does not open in Photoshop. . I welcome comments and feedback. The page is at: http://www.marietta.edu/~spilatrs/MnQuiry/JmolDemo/jmolImgCopy.html (Also; for some reason our server sometimes sends a 'java.security.AccessControlException: access denied ' warning when a Jmol applet page is opened, which goes away with a page refresh) Steve Dr. Steven R. Spilatro Department of Biology and Environmental Science Marietta College - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users
Re: [Jmol-users] Placing Jmol image in same web page
(Also; for some reason our server sometimes sends a 'java.security.AccessControlException: access denied ' warning when a Jmol applet page is opened, which goes away with a page refresh) I used to have that problem too. Upgrading to 11.5.39 from 11.4.? got rid of that problem for me. _ - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users
Re: [Jmol-users] Placing Jmol image in same web page
works for me -- once I figured out I needed to click a radio button. A default there would be nice. Most impressive is that by using a base tag and my own signed applet I can even make it work in MSIE from a version saved to my hard drive. Good job! Bob On Tue, Sep 9, 2008 at 1:34 PM, Steven R. Spilatro [EMAIL PROTECTED]wrote: Hi everyone, I've created a demo page for placing images of the Jmol model into the same web page, drawing upon some ideas and code from Angel Herráez and Dean Edwards. For compliant browsers, the base64-encoded Jmol image is simply directly to an image element; for non-base64 compliant browsers, the decoded image is targeted to an Iframe. I've tested in several browsers (but not Chrome); while the image can be copied and pasted from either type of element; I find that a saved file from the Iframe does not open in Photoshop. . I welcome comments and feedback. The page is at: http://www.marietta.edu/~spilatrs/MnQuiry/JmolDemo/jmolImgCopy.htmlhttp://www.marietta.edu/%7Espilatrs/MnQuiry/JmolDemo/jmolImgCopy.html (Also; for some reason our server sometimes sends a 'java.security.AccessControlException: access denied ' warning when a Jmol applet page is opened, which goes away with a page refresh) Steve Dr. Steven R. Spilatro Department of Biology and Environmental Science Marietta College - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users -- Robert M. Hanson Professor of Chemistry St. Olaf College Northfield, MN http://www.stolaf.edu/people/hansonr If nature does not answer first what we want, it is better to take what answer we get. -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users
[Jmol-users] Intermittent loading error
Hi Steve, I've also had complaints from IE users (particularly) about this with my site. Today I managed to duplicate the problem and capture the log with IE7/XP. FileManager.openFile(test/advanced/ReO3.cif) //test/advanced/ReO3.cif FileManager opening http://www.chemtube3d.com/solidstate/test/advanced/ReO3.cif file ERROR: http://www.chemtube3d.com/solidstate/test/advanced/ReO3.cif java.security.AccessControlException: access denied (java.io.FilePermission C:\Documents and Settings\ngreeves.livad \Application Data\Sun\Java\Deployment\cache \6.0\56\245680b8-446c7509.idx read) openFile(test/advanced/ReO3.cif): 63 ms eval ERROR: java.security.AccessControlException: access denied (java.io.FilePermission C:\Documents and Settings\ngreeves.livad \Application Data\Sun\Java\Deployment\cache \6.0\56\245680b8-446c7509.idx read) line 1 command 1 of file null: load test/advanced/ReO3.cif { 3 3 3 } I know nothing about WIndows but it looks as if some setting in Documents and Settings may be implicated? Could this be the explanation? The html file is http://www.chemtube3d.com/solidstate/ _ReO3(final).htm and it loads just fine for me. All the best Nick -- 3D Organic Animations http://www.chemtube3d.com Tel: +44 (0)151-794-3506 (3500 secretary) On 9 Sep 2008, at 19:55, [EMAIL PROTECTED] wrote: (Also; for some reason our server sometimes sends a 'java.security.AccessControlException: access denied ' warning when a Jmol applet page is opened, which goes away with a page refresh) Steve Dr. Steven R. Spilatro Department of Biology and Environmental Science Marietta College - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users
[Jmol-users] Dynamic base64 decoding
Bob, Well, I'm not sure... In the demo web page I sent earlier I assign the base64-encoded Jmol image, to a image element in the same page: var jmlImgB64 = jmolGetPropertyAsString('image'); document.getElementById(jmlImage).innerHTML = 'img width='+imgWd+' height='+imgHt+' src=data:image/jpeg;base64,' + jmlImgB64 + ''; I'm wondering if Jmol could deliver a non-base64 encoded image (e.g., jpg) that could be assigned to a image element in a similar way? (and therefore eliminate the need for php decoding!) Steve The feature just doesn't exist for browsers. You can set a JavaScript variable to any memory-constrained length, but you are asking for something different, I think. Bob Would a feature like testimg.src=jmolGetImage (jpeg) involve similar contraints? Steve Dr. Steven R. Spilatro Department of Biology and Environmental Science Marietta College - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users
Re: [Jmol-users] Dynamic base64 decoding
Well, if you want, give it a try. You will have to use the latest version of Jmol -- http://chemapps.stolaf.edu/jmol/docs/examples-11/JmolApplet.jar Just issue var x = jmolGetPropertyAsJavaObject(image) That AsJavaObject ensures that the image created is returned as a byte array -- the actual JPEG code -- rather than as a Base64-encoded string. That return value is a Java byte[] object, not a JavaScript object. There is no such thing as a byte array in JavaScript. Good luck! Bob On Tue, Sep 9, 2008 at 4:01 PM, Steven R. Spilatro [EMAIL PROTECTED]wrote: Bob, Well, I'm not sure... In the demo web page I sent earlier I assign the base64-encoded Jmol image, to a image element in the same page: var jmlImgB64 = jmolGetPropertyAsString('image'); document.getElementById(jmlImage).innerHTML = 'img width='+imgWd+' height='+imgHt+' src=data:image/jpeg;base64,' + jmlImgB64 + ''; I'm wondering if Jmol could deliver a non-base64 encoded image (e.g., jpg) that could be assigned to a image element in a similar way? (and therefore eliminate the need for php decoding!) Steve The feature just doesn't exist for browsers. You can set a JavaScript variable to any memory-constrained length, but you are asking for something different, I think. Bob Would a feature like testimg.src=jmolGetImage (jpeg) involve similar contraints? Steve Dr. Steven R. Spilatro Department of Biology and Environmental Science Marietta College - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users -- Robert M. Hanson Professor of Chemistry St. Olaf College Northfield, MN http://www.stolaf.edu/people/hansonr If nature does not answer first what we want, it is better to take what answer we get. -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users
Re: [Jmol-users] Intermittent loading error
Any chance these are pages that involve more than one applet? In any case, it's some sort of caching problem with that browser version. You might get around it by adding a random search to the URL: test/advanced/ReO3.cif?23023789234 where that number changes each time so that it forces an update from the server. Something to test, anyway. Bob On Tue, Sep 9, 2008 at 3:34 PM, Nick Greeves [EMAIL PROTECTED]wrote: Hi Steve,I've also had complaints from IE users (particularly) about this with my site. Today I managed to duplicate the problem and capture the log with IE7/XP. FileManager.openFile(test/advanced/ReO3.cif) //test/advanced/ReO3.cif FileManager opening http://www.chemtube3d.com/solidstate/test/advanced/ReO3.cif file ERROR: http://www.chemtube3d.com/solidstate/test/advanced/ReO3.cif java.security.AccessControlException: access denied (java.io.FilePermission C:\Documents and Settings\ngreeves.livad\Application Data\Sun\Java\Deployment\cache\6.0\56\245680b8-446c7509.idx read) openFile(test/advanced/ReO3.cif): 63 ms eval ERROR: java.security.AccessControlException: access denied (java.io.FilePermission C:\Documents and Settings\ngreeves.livad\Application Data\Sun\Java\Deployment\cache\6.0\56\245680b8-446c7509.idx read) line 1 command 1 of file null: load test/advanced/ReO3.cif { 3 3 3 } I know nothing about WIndows but it looks as if some setting in Documents and Settings may be implicated? Could this be the explanation? The html file is http://www.chemtube3d.com/solidstate/_ReO3(final).htmhttp://www.chemtube3d.com/solidstate/_ReO3%28final%29.htmand it loads just fine for me. All the best Nick -- 3D Organic Animations http://www.chemtube3d.com Tel: +44 (0)151-794-3506 (3500 secretary) On 9 Sep 2008, at 19:55, [EMAIL PROTECTED] wrote: (Also; for some reason our server sometimes sends a 'java.security.AccessControlException: access denied ' warning when a Jmol applet page is opened, which goes away with a page refresh) Steve Dr. Steven R. Spilatro Department of Biology and Environmental Science Marietta College - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users -- Robert M. Hanson Professor of Chemistry St. Olaf College Northfield, MN http://www.stolaf.edu/people/hansonr If nature does not answer first what we want, it is better to take what answer we get. -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users