|
What type of JavaScript Applets are there?
Modifying JavaScript Applets
- You should copy the script "as it is" (in text, source code mode) to the page you would like to include it.
- To make the applet work in the new page: introduce the minimum modifications that allows it to run in the page. See also this resource.
- You should consider changing its behavior by adding more of the same.
For example: suppose you got a script that let a person click in one button and open a page in a new window. To create a toolbar with buttons opening different pages in a new window all that is needed to do is to add more button type elements in the form, one after the other.
- You should consider combining different scripts in the same page.
For example: suppose you got a script to check fields in a form and you adapted it to your form. But, you would like to provide instructions to the person filling the form. You could add the "press a button script and see a pop up window" to the page with the form validation script and you would be done.
- Finally, if what you want cannot be acomplished by "more of the same" and combinations, try looking for analogies, examples, specially in the utilities and others type of Applets.
You can see more applets here. Of course you can also write your own applets from scratch as discussed in this tutorial on programming in JavaScript.
|