APS Excellence in Physics Education Award
November 2019

Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

Open specific page post and replies

Return to the Open specific page thread
Login to post to this thread

Open discussion page
Apostolos Michaloudis
28 Posts


How can i open the description page without right-click?

For example, i have created 2 pages, page 1 and page 2.
I also created a menu bar. When user presses a button in menu, i want to open discussion in page 1. When he presses another button, i want to open discussion in page 2. Is thiw possible?

Also, is it possible to export website with applet?

Thank you for your time! Keep up the good work!

Replies to Open discussion page

Re: Open discussion page -
Francisco Esquembre
228 Posts


Here are some methods of the _simulation object that help you deal with description pages.

A sample call would be:
_simulation. openDescriptionPageInBrowser("MyDescriptionPage");

   * Whether the description dialog should show at start-up (true by default)
   * @param _show
  public void showDescriptionAtStartUp(boolean _show);
   * Shows the description dialog
  public void showDescription ();

   * Shows/Hides the description dialog
   * @param _show
  public void showDescription (boolean _show);

   * Returns the URL of a given Description page
   * @param _htmlPage
   * @return
  public URL getDescriptionPageURL (String _htmlPage);

   * Extracts the description pages (if not yet done) and opens them in the system browser
  public boolean openDescriptionPagesInBrowser();

   * Extracts the description pages and opens the required page in the system browser
  public boolean openDescriptionPageInBrowser(String _name);

The group HTML pages seems to be broken. I need to fix it.

But I typically create a JAR file, run the simulation by double-clicking the jar, and the right-click on the simulation window to get the popup menu with several options. Select the "Create HTML page" and this gives you a self.contained HTML page that. together with the JAR lets you run the simulation as an applet.

The Group html feature saves a bit of space by sharing the library among simulations. But I think the independent JAR option (described above) is better. This is why I never use the Group HTML feature.


Post edited April 30, 2015 at 8:18 AM EST.

Re: Re: Open discussion page -
Apostolos Michaloudis
28 Posts

Mr Esquembre,
thank you very much for your reply!

I really hope that you fix html function
because it is really handy for the students
that don't know html
still they need to create a simple site containing not only the simulations
but the description too.

Re: Re: Re: Open discussion page -
lookang Avatar
222 Posts

I briefly tried to generate for Java to java applet pages and it didn't work because Java now blocks the applet due to high security.

I don't think the problem is with ejs but with Java security.
I tried adding c:/// but it didn't work still.

For info

OSP@SG blog
OSP@SG Digital Library

Re: Re: Re: Open discussion page -
146 Posts

Google has recently announce that Java applets support will cease on the Chrome browser but applets continue to be supported on other browsers.  We recommend that our students use the Firefox browser.

An applet must be delivered from a web server and it must be signed with a valid security certificate in order to run in a web browser.  EJS creates unsigned jar files and it the responsibility of the user to purchase a security certificate and sign the applet.  EJS  and Physlet jar files hosted on ComPADRE are signed by the American Association of Physics teachers.  You can run these applets on the Physlet Physics website:


OSP Projects:
Open Source Physics - EJS Modeling
Physlet Physics
Physlet Quantum Physics
STP Book