[Jmol-users] jmolApplet build up fail

2012-04-13 Thread Martin Hediger
Dear Jmol Users
I'm running a website, where a server side script carries out a number 
of steps, builds up a new HTML structure including a Jmol applet and 
returns it to the browser to be displayed. Without the jmolApplet call, 
everything builds up nicely, but using jmolApplet([300,300]), the page 
is overwritten and only the applet displays.

What are common reasons for such behaviors?
Thanks for any feedback.
Martin

--
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] jmolApplet build up fail

2012-04-13 Thread Jaime Prilusky
A server side script should work fine. Can you provide a URL to see what you 
get?

Jmol + server side scripts that generate HTML on the flight are used on 
numerous sites. A few examples

http://oca.weizmann.ac.il/oca-docs/fgij/fg.htm?mol=2CTS

http://oca.weizmann.ac.il/oca-bin/ccpeek?id=2CTS

http://www.proteopedia.org/wiki/index.php/1stp

Jaim

On Apr 13, 2012, at 11:17 AM, Martin Hediger wrote:

Dear Jmol Users
I'm running a website, where a server side script carries out a number 
of steps, builds up a new HTML structure including a Jmol applet and 
returns it to the browser to be displayed. Without the jmolApplet call, 
everything builds up nicely, but using jmolApplet([300,300]), the page 
is overwritten and only the applet displays.

What are common reasons for such behaviors?
Thanks for any feedback.
Martin

--
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


--
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] jmolApplet build up fail

2012-04-13 Thread Martin Hediger
I believe my problem is with relative/absolute file pathing.
What is unclear to me is the following:
Given I can load an applet, and from its Main menu, I open the 
console. In the console i hit cd, showing me the default directory. 
What is the definition of default directory?
Say cd prints

www.thisjmolpage.com

to the console and I use a Jmol script to set up the applet. Any path in 
the Jmol script has to be relative to this path, correct? Or relative to 
the HTML document initializing the Jmol applet?

Thanks for any clearification.





On 13.04.12 12:28, Jaime Prilusky wrote:
 A server side script should work fine. Can you provide a URL to see what you 
 get?

 Jmol + server side scripts that generate HTML on the flight are used on 
 numerous sites. A few examples

 http://oca.weizmann.ac.il/oca-docs/fgij/fg.htm?mol=2CTS

 http://oca.weizmann.ac.il/oca-bin/ccpeek?id=2CTS

 http://www.proteopedia.org/wiki/index.php/1stp

 Jaim

 On Apr 13, 2012, at 11:17 AM, Martin Hediger wrote:

 Dear Jmol Users
 I'm running a website, where a server side script carries out a number
 of steps, builds up a new HTML structure including a Jmol applet and
 returns it to the browser to be displayed. Without the jmolApplet call,
 everything builds up nicely, but using jmolApplet([300,300]), the page
 is overwritten and only the applet displays.

 What are common reasons for such behaviors?
 Thanks for any feedback.
 Martin

 --
 For Developers, A Lot Can Happen In A Second.
 Boundary is the first to Know...and Tell You.
 Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
 http://p.sf.net/sfu/Boundary-d2dvs2
 ___
 Jmol-users mailing list
 Jmol-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/jmol-users


 --
 For Developers, A Lot Can Happen In A Second.
 Boundary is the first to Know...and Tell You.
 Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
 http://p.sf.net/sfu/Boundary-d2dvs2
 ___
 Jmol-users mailing list
 Jmol-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/jmol-users


--
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] jmolApplet build up fail

2012-04-13 Thread Robert Hanson
Path would be relative to that, yes. But you can make them absolute by
starting them with  / or http://;

The problem with the page overwriting almost certainly means you are firing
the jmolApplet() method after the page is loaded. This method uses
document.write() so it has to be used at the time of page loading.  See the
source for those pages that Jaim suggested.

Bob Hanson

On Fri, Apr 13, 2012 at 8:50 AM, Martin Hediger ma@bluewin.ch wrote:

 I believe my problem is with relative/absolute file pathing.
 What is unclear to me is the following:
 Given I can load an applet, and from its Main menu, I open the
 console. In the console i hit cd, showing me the default directory.
 What is the definition of default directory?
 Say cd prints

 www.thisjmolpage.com

 to the console and I use a Jmol script to set up the applet. Any path in
 the Jmol script has to be relative to this path, correct? Or relative to
 the HTML document initializing the Jmol applet?

 Thanks for any clearification.





 On 13.04.12 12:28, Jaime Prilusky wrote:
  A server side script should work fine. Can you provide a URL to see what
 you get?
 
  Jmol + server side scripts that generate HTML on the flight are used on
 numerous sites. A few examples
 
  http://oca.weizmann.ac.il/oca-docs/fgij/fg.htm?mol=2CTS
 
  http://oca.weizmann.ac.il/oca-bin/ccpeek?id=2CTS
 
  http://www.proteopedia.org/wiki/index.php/1stp
 
  Jaim
 
  On Apr 13, 2012, at 11:17 AM, Martin Hediger wrote:
 
  Dear Jmol Users
  I'm running a website, where a server side script carries out a number
  of steps, builds up a new HTML structure including a Jmol applet and
  returns it to the browser to be displayed. Without the jmolApplet call,
  everything builds up nicely, but using jmolApplet([300,300]), the page
  is overwritten and only the applet displays.
 
  What are common reasons for such behaviors?
  Thanks for any feedback.
  Martin
 
 
 --
  For Developers, A Lot Can Happen In A Second.
  Boundary is the first to Know...and Tell You.
  Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
  http://p.sf.net/sfu/Boundary-d2dvs2
  ___
  Jmol-users mailing list
  Jmol-users@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/jmol-users
 
 
 
 --
  For Developers, A Lot Can Happen In A Second.
  Boundary is the first to Know...and Tell You.
  Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
  http://p.sf.net/sfu/Boundary-d2dvs2
  ___
  Jmol-users mailing list
  Jmol-users@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/jmol-users
 


 --
 For Developers, A Lot Can Happen In A Second.
 Boundary is the first to Know...and Tell You.
 Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
 http://p.sf.net/sfu/Boundary-d2dvs2
 ___
 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
1520 St. Olaf Ave.
Northfield, MN 55057
http://www.stolaf.edu/people/hansonr
phone: 507-786-3107


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
--
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users