Question: External communication with Maple(t)

Here's what I am trying to do:

  1. I launch a Maplet from a webpage either using a local copy of Maple or over the web via MapleNet)
  2. When this Maplet iterminates I want to run a PHP (or Javascript or ...) program.

In order to do this, the web page needs to have some way to detect the termination of the Maplet. Does anyone have a way to do this?

One approach I've considered is to have a Javascript function that starts the Maplet, waits for the Maplet to terminate, then continues with it's job. But, the usual Javascript action is to start a window, after which the script continues to execute. If I could get a process ID for the window displaying the Maplet, I oculd probably have the Javascript spin its wheels until the process ID no longer exists in the list of active processes.

I can also imagine a situation where the Maplet writes a "cookie" somewhere on the client computer. Then the Javascript sits idle until it detects an appropriate trigger in the cookie. But, where to put the cookie? Is there a way to extract the directory from which Maple is run? Or, Maple's lib directory. (Within Maple I know there is the libname command. But, is there a way to send this information to a non-Maple job?

I've thought about using system (or ssystem) but the command to be executed depends on the OS of the system on which the Maplet is being executed.

I'm interested in all varieties of solutions: theoretical to complete implementations.

Thanks in advance,


Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail:
Phone:  (803) 777-6183         URL:
Please Wait...