NetImaging supports several functions available in JavaScript.
To call a function in JavaScript do the following:
<applet name="imaging" archive="imaging.jar" ... >
... parameters ...
</applet>
<script language="javascript">
var imaging = document.applets['imaging'];
imaging.someFunc(); // call someFunc()
</script>
Here is the list of available functions:
|
Returns the current image width. |
|
Returns the current image height. |
|
Displays the selecion box. The format of the "spec" parameter
corresponds to the applet parameter select,
for example:
The specified selector is set regardless of the current proportion constraint.
But the selector will be adjusted if the user manipulates it with the mouse.
|
|
Returns the current selector state. The format of the returned string is:
.
You can parse the returned string with the method split().
If there is no selection the empty string is returned.
|
|
Specifies the proportion constraint.
The format of the "spec" parameter corresponds to the applet's parameter
proportion, for example:
This function removes the current selector (if it exists).
|
|
Returns true if the user has changed the original image, and false otherwise.
|
|
Triggers the upload (save) process (i.e. it acts similar to the "Save" button). Note: You can hide the regular "Save" button from the top panel using the applet parameter visible_buttons. |
|
Appends a user defined field in the upload (save) request.
This function should be invoked before the function upload().
|