JavaScript Usability Enhancements


What is JavaScript?

JavaScript is a HTML scripting language that allows HTML pages to interact with a browser. It was originally developed by Netscape as a way to extend the functionality of HTML. It is supported by Netscape Navigator 2.0 or later and Microsoft Internet Explorer 3.0. Various other browsers either support it or will support it in the near future. Browsers that do not support JavaScript should ignore the embedded JavaScript commands.

Webulator/400 and JavaScript

Webulator/400 can insert a small amount of JavaScript code into every HTML page that it generates. You can enable this support by setting the Send JavaScript configuration value.

Webulator/400 uses JavaScript to add two important usability enhancements. The first enhancement allows the browser to insert the cursor at the start of the correct input field on the screen. It does this by calling a function during the onLoad event. This gives the user the ability to type into a field without first having to select it with the mouse. It also indicates to the user the first input field that may contain an error if the row and column are properly set by the AS/400 application. The second enhancement allows the browser to return the row and column position of the last input field that had focus. It does this by calling a function during the various onFocus events. This feature will allow the user to be able to get field level prompting without having to type a ? into the field.

Why you would want to disable JavaScript

There are a couple of reasons why you may wish to disable the JavaScript support. First of all, JavaScript is an interpreted scripting language which means that the browser must perform extra work to follow the JavaScript instructions. Our testing did not indicate that performance is noticeably slower when including the JavaScript functions. Depending on the equipment and browsers that you use, you may see different results and determine that the added functionality is not worth the price in performance. Secondly, JavaScript is relatively new and not all browser support it. A browser should ignore any HTML tags (including JavaScript tags) that they do not understand. Of course there is no guarantee that all browsers will act appropriately. If your target audience uses ill-behaved browsers, you may wish to disable these feature.