[Jmol-users] Dynamic base64 decoding -- legible
(Sorry about some earlier messages with cryptic punctuation -- I believe I have it resolved; I'm sending this one again.) Hi Bob, Aha, jmolScriptwait; that's the ticket! Yeah, I know about the MSIE issue, and I'm trying to deal with that now. Here's the issue: I'm adding the jmol applet images dynamically to the open webpage, as opposed to exporting to another window as does Angel's code (and very nicely too). My code for MSEI looks like this: if (nav64=='nocomp'){ var testimg=document.getElementById(SnpShtImg) var imgB64 = image/jpeg;base64, + jmolGetPropertyAsString('image'); var B64path=base64.php testimg.src = B64path + ? + imgB64; } Which calls Dean Edwards original base64.php code. It doesn't work; the img appears empty. Yet if I manually feed a base64-encoded image (such as this from Dean Edwards web page), it does work. imgB64=data:image/gif;base64,R0lGODlhDwAPAKECzMzM/wAAACwADwAPAAACIISPeQHsrZ5ModrLlN48CXF8m2iQ3YmmKqVlRtW4MLwWACH+H09wdGltaXplZCBieSBVbGVhZCBTbWFydFNhdmVyIQAAOw==; Could the issue be the size of the jmol-derived image? Thinking about this from another angle; is there a technical reason why jmol cannot deliver a non-base64 encoded image that could be dynamically added to the open web page: something like: testimg.src=jmolGetImage (jpeg)? (Have I just fully revealed my lack of understanding of JAVA, or, is this already possible and I have once again missed it in the documentation?) Thanks! 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] javascript command fails in Safari?
On 9/6/08, Bob Hanson asked: Eric, are you using the signed or unsigned applet? Jmol Tutorial-Authoring Template (JTAT): unsigned only. FirstGlance in Jmol: unsigned 99.9% of the time. There is code to detect installations and situations where the signed applet will be needed to access the PDB file from a different server, and then the user is notified that s/he will have to approve the applet. -Eric - 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 -- legible
On Sun, Sep 7, 2008 at 9:48 AM, Steven R. Spilatro [EMAIL PROTECTED]wrote: Could the issue be the size of the jmol-derived image? Yes, I'm pretty sure that's it. The way to test, of course, is to use the same base64 info from Jmol in an img data: - aware browser. There's a link under the applet at http://chemapps.stolaf.edu/jmol/docs/examples-11/new.htmthat does this. You can always view source for that popup and send it to see what happens. But most browsers place a severe restriction on GET length -- something like 2K total for the URL line. You just have to do it with a form and textarea. Thinking about this from another angle; is there a technical reason why jmol cannot deliver a non-base64 encoded image that could be dynamically added to the open web page: something like: testimg.src=jmolGetImage (jpeg)? just not supported by any browser. (Have I just fully revealed my lack of understanding of JAVA, or, is this already possible and I have once again missed it in the documentation?) it's just that browsers aren't set up to handle binary image data like that. Thanks! 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] echo vs. hover? DOCUMENTATION
At 9/6/08, you wrote: Eric, No, it just means they are related. That's all. OK. How about adding this clarification, please, to the docs under hover and echo and set echo and label: Echos, labels, and hovers are three ways of displaying text within Jmol. Labels and hovers are attached to atoms or draw objects, but echos are not. Echos are placed at fixed locations within the Jmol viewport. Echos cannot have hovers. Nico has released 11.6.RC13, so please check out my bug fixes. Sorry but I won't be able to do that for a few weeks as I'm leaving shortly for a boat trip down the Danube river! Will do when I get back. Thanks, Nico! Yes, Thanks Bob and Nico! -Eric - 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] javascript command fails in Safari?
then for that I'm not aware of any threading issues. But in general, be careful that you are not cycling one thread around and around JavaScript--Jmol--JavaScript--Jmol--... That could be a potential problem. It's good to do some setTimeout() calls just to get a new thread periodically. Otherwise you might get some sort of lock-up. That's a guess. I make it a habit of not sending calls to Jmol from threads that are calling JavaScript from Jmol. And to have, for example, a callback function calling Jmol so that Jmol can call JavaScript... I think you are asking for trouble there. Bob On Sun, Sep 7, 2008 at 10:46 AM, Eric Martz [EMAIL PROTECTED]wrote: On 9/6/08, Bob Hanson asked: Eric, are you using the signed or unsigned applet? Jmol Tutorial-Authoring Template (JTAT): unsigned only. FirstGlance in Jmol: unsigned 99.9% of the time. There is code to detect installations and situations where the signed applet will be needed to access the PDB file from a different server, and then the user is notified that s/he will have to approve the applet. -Eric - 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] Dynamic base64 decoding
Oh, of course! testimg.src = B64path + ? + imgB64; involves a URL, sorry I missed that. Would a feature like testimg.src=jmolGetImage (jpeg) involve similar contraints? Steve I don't think you can put that many bytes on a URL line. Better would be to put the base64 data into a textarea in a form and submit it using method=post. Even that might have some limitations. Bob On Sat, Sep 6, 2008 at 12:19 PM, [EMAIL PROTECTED] wrote: Hi Bob, Aha, jmolScriptwait ? that?s the ticket! Yeah, I know about the MSIE issue, and I?m trying to deal with that now. Here?s the issue: I'm adding the jmol applet images dynamically to the open webpage, as opposed to exporting to another window as does Angel?s code (and very nicely too). My code for MSEI looks like this: if (nav64=='nocomp'){ var testimg=document.getElementById(SnpShtImg) var imgB64 = image/jpeg;base64, + jmolGetPropertyAsString('image'); var B64path=base64.php testimg.src = B64path + ? + imgB64; } 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
It should directly trigger an error (in that case you don't even provide a source file for the image src property)... unless... no one really knows with Internet Explorer ;). Paul Le 7 sept. 08 à 18:44, Steven R. Spilatro a écrit : Oh, of course! testimg.src = B64path + ? + imgB64; involves a URL, sorry I missed that. Would a feature like testimg.src=jmolGetImage (jpeg) involve similar contraints? Steve I don't think you can put that many bytes on a URL line. Better would be to put the base64 data into a textarea in a form and submit it using method=post. Even that might have some limitations. Bob On Sat, Sep 6, 2008 at 12:19 PM, [EMAIL PROTECTED] wrote: Hi Bob, Aha, jmolScriptwait ? that?s the ticket! Yeah, I know about the MSIE issue, and I?m trying to deal with that now. Here?s the issue: I'm adding the jmol applet images dynamically to the open webpage, as opposed to exporting to another window as does Angel?s code (and very nicely too). My code for MSEI looks like this: if (nav64=='nocomp'){ var testimg=document.getElementById(SnpShtImg) var imgB64 = image/jpeg;base64, + jmolGetPropertyAsString('image'); var B64path=base64.php testimg.src = B64path + ? + imgB64; } 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 - 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