> From: Robert Hanson [mailto:[email protected]] 
> Sent: 2013 April 23 19:33
> To: [email protected]
> Subject: Re: [Jmol-users] JSmol in XHTML
>
> I'm not surprised. 
>
> If you can help us do that, it would be great. You are using
>  Jmol.setXHTML(id) ?

I hadn't,  but neither does the simple2.htm example.  
I've tried adding it and it has no appreciable effect.

Also depending on what it's expected to do,  I hope it won't prevent multiple 
instances of jsmol on a single page.

> I don't remember exactly how to test a page in XHTML, so if you would let me 
> know, I can help you.

I've pointed an install of LightTPD at my jsmol folder,  and modified its 
config to send the Content-Type of application/xhtml+xml for files with a 
.xhtml extension.
I then copied the simple2.htm file to simle2.xhtml,  when accessed via a 
browser, it will parse the file in XML mode.

I've identified some changes that are needed so far;

in the JSmol scripts, instances of   need to be changed to    (XHTML5 
does not support the HTML character entities).

in the code for Jmol.jmolCommandInput,  the generated input using ' 
Jmol.control._commandKeyPress(event' is missing a trailing slash,  resulting in 
        <input name='jmolCmd0' id='jmolCmd0' size='60' 
onkeypress='Jmol.controls._commandKeyPress(event,"jmolCmd0","jmol")'>
instead of 
        <input name='jmolCmd0' id='jmolCmd0' size='60' 
onkeypress='Jmol.controls._commandKeyPress(event,"jmolCmd0","jmol")'/>

in simple2.htm,
                + "<br /><br /><a href=simple2.htm?USE=HTML5>HTML5 version</a>" 
  and
                + "<br /><br /><a href=javascript:Jmol.showInfo(jmol,true)>show 
info</a>"  and
                + "<br /><br /><a href=simple2.htm?USE=JAVA>JAVA version</a>"   
should be 
                + "<br /><br /><a href=\"simple2.htm?USE=HTML5\">HTML5 
version</a>"   and
                + "<br /><br /><a 
href=\"javascript:Jmol.showInfo(jmol,true)\">show info</a>" and  
                + "<br /><br /><a href=\"simple2.htm?USE=JAVA\">JAVA 
version</a>"
        
(in XHTML, attribute values must be in quotes)

and lastly,  in simple2.htm,  the jmolButton with the text "ball&stick" should 
be "ball&amp;stick"...

Kevin


------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to