Hello Nico

I have no strong opinion on this new way for the extension you are proposing, but I will share some thoughts. Anything that can put Jmol in Wikipedia will be a great achievement.

1. The Chrome problem with jmolWikiPopupWindow().
As far as I can test (Windows only), this is something specific to Chrome. Even Safari works, despite being Webkit-based too.
My testing suggests that the applet tag is somehow not rendering when built on-the-fly into a new window in Chrome. The source code gets there fine, the square is there, but the applet does not render. I can only fix it by a combination of
a) instead of opening an empty window document, open an existing html page and then feed the new content into it (overwriting in fact whatever the html page has).
b) avoid the use of w.document.close()

I can put these changes into the current Extension in SVN. I don't feel very happy about (b) not using document.close() --sometimes the browsers remain "loading" the page forever--, but it seems not to be giving much trouble in this case in all my test browsers. As for (a), it's one more file but no big fuss. I've tried to avoid using document.write in favour of DOM methods, but cannot manage to do that from one window for the other.

Still, I find no way to have the window title set in Safari and Chrome (text showing in the window top bar should be matching what has been given in the jmolWikiPopupWindow call).


2. In view of #1, I've been doing some testing for an alternative: rather than opening a popup window, create a div floating over the page content. This solution may also be preferred by the WP people.One requisite, in my opinion, is that it can be resized to get a larger Jmol. For this, one has to resort to additional external code, like jQuery + jQueryUI
I have something working, but I'm not sure about the overload that jQuery means (both in terms of downloaded files, not much, and also of dependency on external code).
People may or not like the solution more than the popup.


> With the reactions from Wikipedia people, I havedecided to make the Jmol extension much simpler to use
> by editors of Wikipedia contents.

3. Are you sure that the WP people will not object to popups? We must be sure of that before proceeding.


> For example, I am currently designing basic tags instead of the <jmol> tag :<jmolFile> to open a popup
> window with a Jmol applet for a molecular file already uploaded into Wikipedia, ...
> With this simpler tags, I think the PHP / Javascript / HTML can also be simpler.

4. Using a single tag will certainly help. I've been testing on several occasions the possibility of including a Jmol popup in the ChemBox and a major problem are the nested tags needed with the current Jmol Extension. They are impossible to fit in a wiki template (or at least I've been unable to find the way). A single tag will probably overcome this problem.


> My idea for the moment :
> *   Having a HTML template for the popup window, that is an HTML file with a few variable parts. If
>     we need to havedifferent kinds of popup window (one for crystallography, one for proteins, ...), we
>     can have several templates and even let other people create their own templates.

5. So your idea is to depend on premade html templates that will contain the popup content. That can be a solution, although in principle seems to complicate things, since the template files will go in the Extension set of files you are right. I can help with that part.


> *   The JavaScript file has a function with only a few parameters (url of the molecular file, title, template
>     to use, ...) for creating a popup window : it reads the HTML template, replaces the variables parts
>     anddisplays it in a popup window.

There may be a bit of trouble passing the parameters to the opened window, but it should be possible using template documents.