Dear jmol_developers

Just a quick question.
I am developing a website with embedded jmol applets.
I am loading the jmol applet with an ajax call using the code below (N/B
this is all working fine)

########Javascript########
jmolSetDocument(0);
jmolInitialize("jmol")
jmolSetAppletColor("#FFFFFF");
document.getElementById("datadiv").innerHTML = jmolApplet(500, jmoltext,
'jmolApplet0');

#######HTML##########
<div id='datadiv'></div>

I would like to colour certain residues on a onmouseover event like this:
onmouseover="this.style.backgroundColor='#66FF00'; jmolScript('select
resno = 150; color green;');"

However this reports the error: "could not find applet jmolApplet0".
I assume this is because it is inside a div.
Has anyone got ideas how I tell jmolScript where to look??

Cheers
Mark



-- 
---------------------------------------------------------------------------
Mark Halling-Brown                      | Tel: +44-20-7631-6839
Research Associate                      |
Room 359                                | Fax: +44-20-7631-6803
School of Crystallography               |
Birkbeck College                        | Email:
Malet Street                            | [EMAIL PROTECTED]
London WC1E 7HX                         | [EMAIL PROTECTED]
UK                                      |
              http://people.cryst.bbk.ac.uk/~ghall04
---------------------------------------------------------------------------



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to