AJAX techniques offer sophisticated GUIs on the web, but sometimes you need to execute commands at the command line. This article demonstrates how to build a custom command line you can add to your user interfaceand even get a free run-time scripting engine.
by Greg Travis
January 30, 2007
s science fiction writer Neal Stephenson wrote, "In the beginning was the command line." Before the web and graphical user interfaces (GUIs), computer operators used the lowly command line to control their computers. As antiquated as the command line is, you can still find it in any major, modern operating system. The DOS shell survived intact within early versions of Windows, and its descendant, the Command Prompt, exists in even the latest versions of Windows. And the venerable Unix shells live on in GNU/Linux and other Unix variants, including Mac OSX.
This article describes how to implement a command line in a browser using JavaScript, which has a certain irony. Browsers use graphics heavily and JavaScript exists primarily to activate those graphics, yet the JavaScript technique in this article actually strips away the graphics to get at the unadorned command line.
It's quick, easy and you get access to all the articles on DevX.
This registration/login is to allow you to read articles on devx.com. Already a member?
To become a member of DevX.com create your Member Profile by completing the form below. Membership is free!