There is no way document.getElementById fails for any browser. But there was a problem earlier with the† way the logic worked in the method just above this.

function _jmolFindApplet(target) {
† // first look for the target in the current window
† var applet = _jmolFindAppletInWindow(_jmol.appletWindow != null ? _jmol.appletWindow : window, target);
† // THEN look for the target in child frames
† if (applet == undefined)
††† applet = _jmolSearchFrames(window, target);
† // FINALLY look for the target in sibling frames
† if (applet == undefined)
††† applet = _jmolSearchFrames(top, target); // look starting in top frame
† return applet;
}

In older versions of Jmol, this was looking in frames below the current window and, I think, NOT in the currrent window itself. Somehow that worked for some older browsers but not others. So you should be fine.



2011/1/29 Angel HerrŠez <angel.herraez@uah.es>
I think this is mainly for Bob:

Jmol.js has this:

function _jmolFindAppletInWindow(win, target) {
† †var doc = win.document;
† †// getElementById fails on MacOSX Safari & Mozilla
† †if (_jmol.useHtml4Object || _jmol.useIEObject)
† † †return doc.getElementById(target);
† †else if (doc.applets)
† † †return doc.applets[target];
† †else
† † †return doc[target];
}


I am planning to put MacOSX Safari & Mozilla † †into the "_jmol.useHtml4Object" set.
According to the comment above, Ithat would lead to trouble.

Is there a problem with that, at least in recent versions f the browsers?
The test for †_jmol.hasGetElementById †is true for these browsers, right? So what's the trap?



------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers



--
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