Using JavaScript to Write JavaScript
By Nash R. Radovanovic
Have you ever used one program to generate another? Chances are, you've at least considered it. Realtime, on-demand, on-the-fly code generation can solve many problems caused by inflexible, static code. On the other hand, dynamic programming requires very precise planning and utmost concentration.
I have been trying to use dynamic tools to liven up HTML since it was introduced. I tried Java, but it would not run on a 16-bit Windows platform. The next best thing was JavaScript.
JavaScript to the Rescue
JavaScript's most popular features include the ability to write formatted HTML text to the screen and its built-in functions for showing current date, time, client information, and so on. The next step, dynamic page generation, involves integrating JavaScript with frames. It's common enough to use JavaScript to write HTML from one frame to another. Using JavaScript to write JavaScript from one frame to another is less common, but it's happening. Ultimately, however, you can use JavaScript to write JavaScript that will write JavaScript back and forth, from any frame to any frame.
But what is the use for this technique ? Here is an example.
Your Own InterNote Book
A good, old-fashioned note book has a hard cover, pages you can flip through, and brightly colored divider pages to separate subjects; see