Re: [Jmol-users] script in string

2008-08-28 Thread Angel Herráez
On 21 Aug 2008 at 23:20, Jeff Hansen wrote: > var loadJmol = " type='text/javascript'>addJmol(molecule, > divInc);"; This looks like a problem I often had in other contexts. Try breaking the closing script tag: var loadJmol = "

Re: [Jmol-users] script in string

2008-08-22 Thread Robert Hanson
I guess I don't understand the context here. What is the "addJmol" command? Why is it being created as a script tag and not just as addJmol() // whatever that may be Bob On Fri, Aug 22, 2008 at 2:22 PM, Matthew Zwier <[EMAIL PROTECTED]> wrote: > If it's in the HTML page itself, wrapping

Re: [Jmol-users] script in string

2008-08-22 Thread Matthew Zwier
If it's in the HTML page itself, wrapping the code in a CDATA section should help: // type='text/javascript'>addJmol(molecule, divInc);"; //]]> Not sure on the compatibility factor for older browsers, but anything recent should digest it just fine. MZ On Fri, A

Re: [Jmol-users] script in string

2008-08-21 Thread Dean Johnston
I'm not sure of the context, but this should be OK if it's part of an * external* javascript file. If it's within an HTML page, the browser is interpreting the in your string as the closing tag of your script, thereby rendering everything that follows as HTML. Dean On Thu, Aug 21, 2008 at 11:20

[Jmol-users] script in string

2008-08-21 Thread Jeff Hansen
Can anyone help me figure out what is wrong with this line of code? var loadJmol = "addJmol(molecule, divInc);"; What is happening is the is not being recognized or something and everything from the closing quotation mark on, including the next several lines until the next