2nd try
It seems that the popup page cannot read variables from the opener page
(at least in my Firefox Win), so I've changed the procedure:
1. set a javascript variable in the mother page which value is set depending
on
your choice ("left" or "right" in your example). Let's say that variable is
called
whichJmol
2. change the newAppletWindow() function in new.js to read and use that
variable in the link, like
var newwin=open("JmolPopup.htm?whichJmol=" + whichJmol,"jmol_"+sm,
woptions2)
Note I am using the same word for the variable name and the URL
parameter; they could be different.
3. modify the JmolPopup.htm source like
function getState(){
if (theScript) {
return theScript
}
if (!opener) {
alert("The page that opened this pop-up window is not available.")
return ""
}
var t = location.search.split('whichJmol=')[1]; //this is crude, may be done
safer
return opener.jmolGetPropertyAsString("stateInfo","", t ? t : "0")
}
Ah, everything is fine here.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users