* Not much in the way of online JavaScript editors available
So I needed to create a Web form for my wife company. Simple enough you might say except she wanted some logic embedded. The logic isn’t complex but it also isn’t your everyday “is this field filled in and is it numeric” kind of decision.
Nope, her company sells apparel and the order minimum is three styles and six units per style in any mixture of sizes. So, you can imagine the algorithm: Outer loop indexes through the style, and an inner loop indexes through the sizes for each style adding up the number of units. At the end of the inner loop if one or more units are selected for a style, increment the number of styles selected. If the number of units for that style is less than six then set an error for too few units selected for that style. When the outer loop finishes if the number of styles selected is less than three set a flag for too few styles selected.
Surely, I thought, there must be a Web service to build this kind of code?
First, I tried Codehouse’s Mini JavaScript Editor. This is interesting, but very limited. You enter some Javascript in one field, click on “Run JavaScript,” and hope something appears in the output field. This service really is minimal and of marginal use for all but simplest tasks.
Next we have W3Schools’ JavaScript Tutorial, which uses an embedded JavaScript editor called TryIt Editor to illustrate examples. This is a great teaching tool but not a hugely useful development tool lacking, as it does, any debugging tools and nothing more than a rudimentary editor. The previous version of TryIt had an interesting cross-site scripting problem so if you plan to build anything similar in your Web application be warned.
The most ambitious editor I found was Andrea Giammarchi’s experimental Overbyte JavaScript editor and debugger.
This project supports all of the major browsers and a number of sophisticated programmers features including real-time debug; in-place “suggest” (code suggestions and analysis); load and save local files; optional parsing of JavaScript as version 1.7; x-html mode, which allows you to create a Web page instead of direct script execution; “code cruncher,” which compresses your JavaScript by removing white space, line breaks, etc.; syntax highlighting; and a portable PHP download
Overbyte is not for the fainthearted as it is really very limited in the hand holding department. Perhaps its biggest weakness is reporting errors without telling you where the error actually is. For large projects this would be a huge problem.
So from my research it seems that there’s really not much in the way of online JavaScript editors, which is surprising as there are any number of good to excellent offline tools that could be easily adapted. If you know of something I’ve missed, let me know.




