Previous Next        Current Page: NeXtMidas User's Guide / Applets and WebStart / Applets
FAQs   
Release Information   
Getting Help   
Basic Concepts   
Result Parameters   
XML Support   
Files   
System Operation   
Macros   
Applets and WebStart   
   - Applets   
      - Applets (Advanced)   
      - Macros in Applets   
   - WebStart   
Graphics   
X-Midas Interoperability   
Third-Party Compatibility   
Installation and Customization   
Running NeXtMidas Independently   
Glossary   


Applet

NeXtMidas can run as an applet within a web page. Because of browser security concerns, NeXtMidas capabilities are limited in this mode, and it may be necessary for you to manually enable permissions the first time a NeXtMidas-containing web page is opened on a given computer. The procedure depends on whether your browser is Internet Explorer or Netscape.

It is not necessary to execute the nmstart script before opening a web page that runs NeXtMidas as an applet. The web page invokes the MApplet class.

A number of Applet parameters are available from which you can configure your NeXtMidas applet environment. The available options are:

    AUX    - The write AUX and read AUX list using the syntax
             "<write> <read list>" (default is "RAM RAM|DAT").
    CMD    - The command to run (e.g. "MYAPP").
    HOME   - The home directory to use.
    NMROOT - Overrides the default NMROOT setting (which
             matches the codebase).
    NMS    - The macro to use in place of nmstartup.mm.
    OPTS   - The option trees to add to the path (e.g. "UCL,SYS").
    WIN    - Window name (e.g. "MYWIN"). This is the special
             ID that can be passed via a switch
(/WIN= for a graphical primitive OR /WIN.PANEL= for a graphical macro) to panel to allow the panel to embed in the browser rather than show up in a separate window.

Look at this simple example which opens a NeXtMidas graphical shell (primitive) inside a web page:

<html>
 <head>
   <title>NeXtMidas Terminal Applet</title>
 </head>
  <body>
   <applet codebase="."
           code="nxm.sys.libg.MApplet"
           width="100%"
           height="100%">
     <param name="WIN" value="TERMINAL">
     <param name="CMD" value="SHELLGUI/WIN=TERMINAL">
   </applet>
 </body>
</html>
 
Here is another example of an applet which requires multiple option trees and the /WIN.PANEL= switch to properly embedded the DEMO macro inside the applet window on the web page.
<html>
  <head>
    <title>NeXtMidas Demo</title>
  </head>
  <body>

    <applet codebase="." code="nxm.sys.libg.MApplet" name="Demo"
             width="100%" height="100%">
      <param name="WIN" value="DEMOWIN">
      <param name="OPTS" value="DSP,SYS">
      <param name="CMD" value="DEMO/WIN.PANEL=DEMOWIN/THEME=BROWSER">
    </applet>

  </body>
</html>

Additional examples are located in the $NMROOT/htdocs directory that was created when you installed NeXtMidas.