Archive for September, 2007

Web host forum - L Lexical scoping (Definition) See also: Associativity,

Monday, September 10th, 2007

L Lexical scoping (Definition) See also: Associativity, Comment, Constant, Identifier, int, JavaScript language, Keyword, Line terminator, Literal, Operator, Operator Precedence, Punctuator, Reserved word, Token, Whitespace Lexical scoping (Definition) The scope within which functions are executed. Functions are lexically scoped in JavaScript and because they are not dynamically scoped, they are static to within the location they are defined. This means they run in the global scope of the document in which they live and not the one they are called from. In versions of JavaScript prior to 1.2, the scope for a function declaration was limited to the global scope. This was a simple scope arrangement and caused little confusion and difficulty. From version 1.2 onwards, because functions can now be defined inside functions, they cannot be called from outside those functions and the scoping rules start to become more complex. There becomes an issue of persistence of the scope of a function and if a nested function is called from outside its containing function, the containing function’s scope is still present and added to the scope chain along the way when the inner function is called. To illustrate this, suppose a function AAA is created and within it, another BBB is created. You can call AAA and while executing its code, a call to BBB might be made. Inside BBB, the scope chain contains the global object, the call object of AAA and the call object of BBB. If BBB is called from outside AAA, as in AAA.BBB(), then the exact same scope chain is constructed. This can become even more complex if functionobjects are manufactured at run-time. It might be possible to conceive a functionobject factory that can preserve the scope chain that persisted at the time the functions were created. If those functionobjects are preserved and executed later, the scope chain that was in existence at the time they were created will be restored when they are executed. This is far too confusing to be of great use and may turn out to be somewhat non-portable. This capability is realized by storing the function that has been manufactured in a special kind of object. These are called Closure objects and are implemented visibly in Navigator 4. See also: __parent__, Closure object LI object (Object/HTML) An object that represents an

  • object in the document. Availability: DOM level 1 JavaScript 1.5 JScript 3.0 Internet Explorer 4.0 Netscape 6.0 1331

  • Com web hosting - JavaScript Programmer’s Reference A single line comment must

    Monday, September 10th, 2007

    JavaScript Programmer’s Reference A single line comment must finish at the end of the line and cannot contain a line terminator. You can place multiple single line comments one after another if required, each one separated by a line terminator. Multiple line comments are replaced by a single line terminator during parsing. It doesn’t matter how many line terminators they actually contain. This means that a multiple line comment behaves syntactically as if it were a line terminator. Tokens are the actual components that your executable script is built from. They may be reserved words, identifiers, punctuator symbols or literals. See also: Automatic semicolon insertion, Comment, Comment (// and /* … */), Escape sequence (), Line terminator, Multi-line comment, Script Source Text, Token, Whitespace Cross-references: ECMA 262 edition 2 section 7 ECMA 262 edition 3 section 7 O’Reilly JavaScript Definitive Guide page 27 O’Reilly JavaScript Definitive Guide page 9-201 Lexical element (Overview) A component from which a script is constructed. A lexical element is a component from which you can construct a script. It is the smallest (or most atomic) fragment that a script can be decomposed into to allow the execution mechanisms in the interpreter to operate. Each lexical element is represented by a token and the script is tokenized through a process of lexical analysis. The following lexical elements are used to construct a script: . Whitespace . Line terminator . Literal (Constant) . Identifier . Keyword . Reserved word . Operator . Punctuator . Comment 1330

    L Lexical convention (Definition) A B CDEF (Web design)

    Sunday, September 9th, 2007

    L Lexical convention (Definition) A B CDEF G H IJ K L M N O P Q R S T U V W X Y Z 0 1 2 3 4 5 6 7 8 9 ! ” #% & ‘ ( ) *+ , . / : ; < = > ? [ ` ] ^ _{ | } ~ A fully ECMA compliant interpreter should allow you the full use of the Unicode character set for specifying identifier names but this whole area of localization and internationalization is under discussion at the time of writing. Future versions of the ECMA 262 standard or appendices to it may clarify the situation. See also: isAlnum(), isAlpha(), isCtrl(), isDigit(), isGraph(), isLower(), isODigit(), isPrint(), isPunct(), isSpace(), isUpper(), isXDigit(), Printing character Lexical convention (Definition) ECMAScript defined certain lexical conventions. Availability: ECMAScript edition 2 According to the ECMAScript standard, a compliant interpreter should follow a certain logical process when converting the source text of a script into an executable form. The standard defines a set of logical entities, which can be combined to make a program. This abstract definition is broad enough that all JavaScript interpreters can be considered to be ECMAScript compliant on this issue. A script is composed of an unordered collection of the following kinds of entities: . Whitespace . Line terminators . Comments . Tokens Whitespace is used to improve the readability of the script and to separate tokens from one another, where they could be misinterpreted if they were concatenated together. Line terminators are used to improve the readability of the source text and to separate tokens. However, unlike whitespace, line terminators can affect the behavior of the script when placed in certain places. In general, a line terminator can occur between any two tokens but cannot appear in a token or inside a string literal. Line terminators in string literals must be escaped if they are required as part of the string. Line terminators also affect the automatic semicolon insertion process. Comments can be contained completely on a single line or can span multiple lines. 1329

    JavaScript Programmer’s Reference Refer to the operator precedence (Ftp web hosting)

    Saturday, September 8th, 2007

    JavaScript Programmer’s Reference Refer to the operator precedence topic for details of execution order. The result is the Boolean value trueif anOperand1is numerically or lexically less than or equal to anOperand2, otherwise false is returned. See also: ASCII, Associativity, Equal to (==), Greater than (>), Greater than or equal to (>=), Identically equal to (===), Less than (<), Logical expression, Logical operator, NOT Equal to (!=), NOT Identically equal to (!==), Operator Precedence, Relational expression, Relational operator, Unicode Cross-references: ECMA 262 edition 2 section 11.8.3 ECMA 262 edition 2 section 11.8.5 ECMA 262 edition 3 section 11.8.3 ECMA 262 edition 3 section 11.8.5 Letter (Definition) A valid and printable character. Since JavaScript is available across such a wide variety of platforms, locales and environments, you may introduce some characters that appear to mutate as the script moves from one environment to another. It is fairly safe to use any character in the lower 128 set that corresponds to ASCII. Even then, you may find that hash (#) and GB pound signs ( ) get confused in some editors. It is somewhat less safe to use the next 128 character codes up to 255 because these are mapped quite differently on Macintosh, UNIX and Windows systems. If you can use a Unicode compliant environment, these problems may be minimized and the character you type will be the same on other platforms if they fully support Unicode. However they may not appear the same on non Unicode platforms. In any case, a non-Unicode compliant platform may not support the 16 bit (double-byte) characters that Unicode requires and may only be able to cope with 8 bit characters. Historically, only 7 bit character codes could be guaranteed to arrive intact, but these days 7 bit serial connections are in decline. Even so, you may find them on some ancillary equipment; in particular you may find rack mounted units that have an RS232 serial interface. You should be very wary of these since they may not support 16 bit character values. This set of characters (plus the space, newline and tab characters) is the smallest safe set to write your script in. Any other characters can be encoded as escape sequences using these characters. a b cd e fg h i jk l m no p q rs t u v wx y z 1328

    Web site templates - L Less than or equal to (),

    Saturday, September 8th, 2007

    L Less than or equal to (<=) (Operator/relational) ASCII, Associativity, Equal to (==), Greater than (>), Greater than or equal to (>=), Identically equal to (===), Less than or equal to (<=), Logical expression, Logical operator, NOT Equal to (!=), NOT Identically equal to (!==), Operator Precedence, Relational expression, Relational operator, Unicode See also: Cross-references: ECMA 262 edition 2 section 11.8.1 ECMA 262 edition 2 section 11.8.5 ECMA 262 edition 3 section 11.8.1 ECMA 262 edition 3 section 11.8.5 Less than or equal to (<=) (Operator/relational) Compare two operands to determine which is nearer to -Infinity or whether they are equal. Availability: ECMAScript edition 2 JavaScript 1.0 JScript 1.0 Internet Explorer 3.02 Netscape 2.0 Netscape Enterprise Server 2.0 Opera 3.0 Property/method value type: Boolean primitive JavaScript syntax: -anOperand1 <= anOperand2 anOperand1 A value that can be compared numerically or lexically Argument list: anOperand2 A compatible value Returns true if the left operand is numerically less than or equal to the right operand or is sorted earlier or identically in the Unicode collating sequence when two string values are compared. In numeric comparisons, the presence of NaNin either or both operands will yield undefined instead of trueor false. When comparing two strings, a prefixing plus sign is present, then a numeric coercion of a string takes place before the comparison. Numeric coercion takes place when either of the operands is numeric. In ECMA compliant JavaScript implementations, string values are simply compared according to the Unicode character code point values, with no attempt to provide the more complex semantically oriented definitions of character and string equality defined in the Unicode version 2.0 specification. The associativity is from left to right. 1327

    JavaScript Programmer’s (Web site translator) Reference Length units (Definition) A sub-set

    Friday, September 7th, 2007

    JavaScript Programmer’s Reference Length units (Definition) A sub-set of the available set of measurement units used with CSS style sheets and style object properties. See also: Legend.padding, style.layoutGridChar, style.layoutGridLine, Measurement units Less than (<) (Operator/relational) Compare two operands to determine which is nearer to -Infinity. Availability: Property/method value type: JavaScript syntax: Argument list: Returns true if the left operand is numerically less than the right operand or is sorted earlier in the Unicode collating sequence when two string values are compared. In numeric comparisons, the presence of NaNin either or both operands will yield undefined instead of trueor false. When comparing two strings, a prefixing plus sign is present, then a numeric coercion of a string takes place before the comparison. Numeric coercion takes place when either of the operands is numeric. In ECMA compliant JavaScript implementations, string values are simply compared according to the Unicode character code point values with no attempt to provide the more complex semantically oriented definitions of character and string equality defined in the Unicode version 2.0 specification. The associativity is from left to right. Refer to the operator precedence topic for details of execution order. The result is the Boolean value trueif anOperand1 is numerically or lexically less than anOperand2, otherwise false is returned. ECMAScript edition 2 JavaScript 1.0 JScript 1.0 Internet Explorer 3.02 Netscape 2.0 Netscape Enterprise Server 2.0 Opera 3.0 Boolean primitive -anOperand1 < anOperand2 anOperand1 A value that can be compared numerically or lexically anOperand2 A compatible value 1326

    L length (Property) Object Length value Form (Ipower web hosting)

    Thursday, September 6th, 2007

    L length (Property) Object Length value Form The number of input elements in a form Form.elements The number of input elements in a form FormArray The number of forms in a document FormElementsArray The number of input elements in a form FrameArray The number of frames in a frameset Frames The number of frames in a frameset, window or iframes in a document Function The number of arguments expected by a function History The length of the historical record of pages visited ImageArray The number of images in a document JavaArray The length of a Java array encapsulated by JavaScript JavaObject The number of MIME types supported by a plugin encapsulated in a JavaObject LayerArray The number of layers in a document LinkArray The number of HREF links in a document MimeTypeArray The number of discrete MIME types that the browser supports NamedNodeMap The number of named DOM nodes in a node map. NodeList The size of a DOM node collection OptionsArray The range of options in a popup menu Plugin The number of MIME types supported by a plugin PluginArray The variety of plugins currently installed in the browser ScriptArray The number of script blocks in a document Select The range of options in a popup menu SelectorArray The number of rules in a style sheet String The length of a string in characters style The number of individual style components in a style rule styleSheets The number of style sheets called in by the document textNode The length of a textNode in characters Window The number of frames in a window Although the length property is marked here as ReadOnly, in some circumstances it may be useful to assign a value to it to extend, or truncate an Array object. See also: Array.length, Form.elements.length, Form.length, Window.length Property attributes: ReadOnly. 1325

    JavaScript Programmer’s Reference length (Property) The length, magnitude,

    Thursday, September 6th, 2007

    JavaScript Programmer’s Reference length (Property) The length, magnitude, or size of an object depending on its type. Availability: JavaScript 1.0 JScript 3.0 Internet Explorer 4.0 Netscape 2.0 Opera 3.0 Property/method value type: Number primitive -frames.length -length -myObject.length -myWindow.frames.length JavaScript syntax: -myWindow.length Many objects respond to the length property accessor message. They don’t all yield the same sort of value, although the value they yield will always be numeric. For example, Window objects have a length property. In this case it will yield the number of frames in the window, and it is also available as a global variable called length. The other objects that provide a lengthproperty don’t reflect its value into so many alternative ways of accessing it. Apart perhaps from the Form.length value which is the same as the Form.elements.length value. This is necessary because the Form.elements collection is superimposed on the Formobject so that you can access individual elements of the form as if they were direct member properties of the Form object. If you try to enumerate the Form object, you get lots of properties enumerated which are not form elements. You should therefore enumerate the Form.elements array. This table lists objects which have a length property, and describes what it counts. Object Length value AnchorArray The number of named anchors in a document AppletArray The number of applets installed in a document Arguments The number of arguments presented to a function when it was called Array One greater than the highest numbered index in an array Attributes The size of the complete set of HTML tag attributes defined for an HTML Element object CharacterData The length in characters of a DOM character data node Collection One greater than the highest numbered index in a collection Date The number of arguments expected (always 7) EmbedArray The number of plugins installed into a document Filters The number of filters stacked up on a displayable object in MSIE Table continued on following page 1324

    L Legend.padding (Property) Warnings: . Note that

    Tuesday, September 4th, 2007

    L Legend.padding (Property) Warnings: . Note that there are sometimes problems with aligning Legend objects using the top and bottom values in MSIE version 4. Legend.padding (Property) The padding around a Legend object. JScript 3.0 Number primitive Availability: Internet Explorer 4.0 Property/method value type: JavaScript syntax: IE mylegend.padding The padding around the legend separates it from the container in much the same way as cells in a table are padded apart from one another. The value can be specified as a floating point value followed by a unit of measure indicator. These indicators are valid: . cm . mm . in . pt . pc . px The em and exrelative unit of measure are also available as well as a percentage value measured against the width of the parent container. See also: Measurement units 1323

    JavaScript Programmer’s (My web site) Reference Event name JavaScript JScript N

    Tuesday, September 4th, 2007

    JavaScript Programmer’s Reference Event name JavaScript JScript N IE Opera DOM HTML Notes onKeyDown 1.5 + 3.0 + 6.0 + 4.0 + 4.0 + Warning onKeyPress 1.5 + 3.0 + 6.0 + 4.0 + 4.0 + Warning onKeyUp 1.5 + 3.0 + 6.0 + 4.0 + 4.0 + Warning onMouseDown 1.5 + 3.0 + 6.0 + 4.0 + 4.0 + Warning onMouseMove 1.5 + 3.0 + 6.0 + 4.0 + 4.0 + Warning onMouseOut 1.5 + 3.0 + 6.0 + 4.0 + 4.0 + Warning onMouseOver 1.5 + 3.0 + 6.0 + 4.0 + 4.0 + Warning onMouseUp 1.5 + 3.0 + 6.0 + 4.0 + 4.0 + Warning onScroll 3.0 + 4.0 + - onSelectStart 3.0 + 4.0 + - Inheritance chain: Element object, Node object Legend.align (Property) The alignment of the legend object relative to its surrounding objects. Availability: DOM level 1 JavaScript 1.5 JScript 3.0 Internet Explorer 4.0 Netscape 6.0 Deprecated Property/method value type: String primitive JavaScript syntax: -mylegend.align The alignment of the Legend object with respect to its containing parent object is defined in this property. The expected and widely available set of alignment specifiers are: . absbottom . absmiddle . baseline . bottom . center . left . middle . right . texttop . top 1322