Archive for November, 2007

M (Medical web site) MENU.compact (Property) Event name JavaScript JScript

Friday, November 23rd, 2007

M MENU.compact (Property) Event name JavaScript JScript N IE Opera DOM HTML Notes onClick 1.0 + 1.0 + 6.0 + 4.0 + 3.0 + 4.0 + Warning onDblClick 1.2 + 3.0 + 6.0 + 4.0 + 3.0 + 4.0 + Warning onDragStart 3.0 + 4.0 + - onFilterChange 3.0 + 4.0 + - onHelp 3.0 + 4.0 + Warning onKeyDown 1.2 + 3.0 + 6.0 + 4.0 + 3.0 + 4.0 + Warning onKeyPress 1.2 + 3.0 + 6.0 + 4.0 + 3.0 + 4.0 + Warning onKeyUp 1.2 + 3.0 + 6.0 + 4.0 + 3.0 + 4.0 + Warning onMouseDown 1.2 + 3.0 + 6.0 + 4.0 + 3.0 + 4.0 + Warning onMouseMove 1.2 + 3.0 + 6.0 + 4.0 + 4.0 + Warning onMouseOut 1.1 + 3.0 + 6.0 + 4.0 + 3.0 + 4.0 + Warning onMouseOver 1.0 + 1.0 + 6.0 + 4.0 + 3.0 + 4.0 + Warning onMouseUp 1.2 + 3.0 + 6.0 + 4.0 + 3.0 + 4.0 + Warning onSelectStart 3.0 + 4.0 + - Inheritance chain: Element object, Node object MENU.compact (Property) An attribute that controls the display of

items and the amount of space they require on the screen. Availability: DOM level 1 JavaScript 1.5 JScript 3.0 Internet Explorer 4.0 Netscape 6.0 Property/method value type: Boolean primitive JavaScript syntax: -myMENU.compact Refer to: DL.compact menubar (Property) An alias for the window.menubar property. Availability: JavaScript 1.2 Netscape 4.0 Property/method value type: Bar object 1429

JavaScript Programmer’s Reference You cannot force a garbage (Web and email hosting)

Thursday, November 22nd, 2007

JavaScript Programmer’s Reference You cannot force a garbage collection in a JavaScript execution session in a web browser other than by setting the location.hrefof the current page to itself. This has the side effect of reloading the page from the web server, presenting the user with a possibly ugly transition artifact and increasing net traffic. However, this may be far more preferable than consuming 50 Megabytes of memory every few minutes in the client. See also: Garbage collection, Memory leak MENU object (Object/HTML) An object that represents the contents of a

tag. Availability: DOM level 1 JavaScript 1.5 JScript 3.0 Internet Explorer 4.0 Netscape 6.0 Inherits from: Element object IE myMENU = myDocument.all.anElementID IE myMENU = myDocument.all.tags(”MENU”)[anIndex] IE myMENU = myDocument.all[aName] -myMENU = myDocument.getElementById(anElementID) -myMENU = myDocument.getElementsByName(aName)[anIndex] JavaScript syntax: -myMENU = myDocument.getElementsByTagName(”MENU”)[anIndex] HTML syntax: anIndex A reference to an element in a collection aName An associative array reference Argument list: anElementID The ID value of an Element object Object properties: compact Event handlers: onClick, onDblClick, onDragStart, onFilterChange, onHelp, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onSelectStart The DOM level 1 specification refers to this as a MenuElement object. See also: Element object Property JavaScript JScript N IE Opera DOM HTML Notes compact 1.5 + 3.0 + 6.0 + 4.0 + 1 + - 1428

M Memory allocation (Definition) Memory allocation (Definition) (Geocities web hosting)

Wednesday, November 21st, 2007

M Memory allocation (Definition) Memory allocation (Definition) The process of locating and allocating some memory to store a string or object. See also: Reference counting, Memory management Memory leak (Definition) The consumption of memory that is not recoverable. When the reference count for an object is zero, the object can be garbage collected. Also, because there are no references to it, you have no handle by which you can reach it, so if it isn’t garbage collected, it will waste the space it occupies. When that happens, you have a memory leak. Memory leaks typically happen in web-based JavaScript when you create and destroy a lot of strings in a loop. Concatenating many strings together and extending one string incrementally is a typical leak-producing technique. Garbage collection generally only happens in web browsers when the page is refreshed. delete, Garbage collection, Memory management, Object(), Option(), Reference counting, Variable, Window.setInterval(), Window.setTimeout() See also: Cross-references: Wrox Instant JavaScript page 29 Memory management (Definition) The process of organizing and keeping track of memory allocation and de-allocation. Memory management in compiled languages tends to be a primary concern of software developers. Because JavaScript is interpreted and is intended for use by designers as well as developers, a great deal of the complexity of memory management is hidden from view. It is still possible however to design a script that will consume large amounts of memory due to what is called a memory leak. A memory leak is when you allocate some storage and you don’t subsequently relinquish it and make it available to the system again. A prime example of a memory leak in the context of a JavaScript execution is the allocation of string data to String variables. When a new assignment is made, the old storage is unlinked from the variable and some new storage is allocated. This means that the storage management is far simpler because the strings tend to grow longer as new values are assigned. However, in a web browser, the discarded string values continue to sit around in memory until the page is refreshed. At that stage, all page local values are purged and the memory is freed. 1427

Tomcat web server - JavaScript Programmer’s Reference MediaList object (Object/DOM) This object

Wednesday, November 21st, 2007

JavaScript Programmer’s Reference MediaList object (Object/DOM) This object is added to DOM level 2 to support media lists in style sheets. Availability: JavaScript syntax: N DOM level 2 JavaScript 1.5 Netscape 6.0 myMedialist = new MediaList() DOM level 2 specifies the following properties for this object: . mediaText . length DOM level 2 specifies these methods: . item() . deleteMedium() . appendMedium() Member (Definition) Elements within an object. Members of structures and unions in other languages have some analogy with methods and properties of an object. In a procedural language you can access members of a structure by name. So also can you access properties within an object. A member name is an identifier. The notation for accessing structure members in C language and property values in JavaScript is identical: . anObject.aProperty . aCStruct.aMember There is a variation in JavaScript that allows properties to be called as functions, thus: . anObject.aFunctionProperty() This notation can also denote methods that belong to an object. See also: Method, Namespace 1426

M MAYSCRIPT (HTML Tag Attribute) MAYSCRIPT (HTML (Affordable web design)

Tuesday, November 20th, 2007

M MAYSCRIPT (HTML Tag Attribute) MAYSCRIPT (HTML Tag Attribute) An attribute on the tag to allow Java to access the JavaScript object space. This is an HTML tag attribute that can significantly affect the success or failure to run applets and plugins properly. The MAYSCRIPT attribute must be present in the tag if you have applets that expect to communicate with JavaScript. This is a way of allowing applets to script under the behest of the web page author who may not be the person who programmed the applet. This way, the author has to know and expect the applet to connect to JavaScript before the applet is able to do so. Without this attribute, an applet is not able to access the JSObject class and communicate with the JavaScript environment. The MAYSCRIPT HTML tag attribute is not reflected into the JavaScript environment. See also: JavaScript embedded in Java, JSObject object Measurement units (Definition) Style position and size properties use measurement units to locate objects on the screen. Measurement units specify the units of measure of a quantity. These are typically used for length measurement but may also be used for time measurement in aural style sheet properties. The units include the following: 1425 Unit Description # A hash precedes hex color triplet values. % A percentage of the containing element’s value. cm Absolute measure of a centimeter. deg A value used for angular positioning of sound sources. em A floating point value indicating a fractional portion of the length of an em-dash in the current font. ex A floating point value used to multiply the height of a small x in the current font. Hz A frequency value for aural style sheets. in Absolute measure of an inch. kHz A frequency value for aural style sheets. mm Absolute measure of a millimeter. ms A value in milli-seconds (used for aural style durations). pc Absolute measure of a pica. pi Absolute measure of a pica (possibly a misprint in some documentation). pt Absolute measure using a font point size. px An integer value measured in pixels on the screen. s A value in seconds (used for aural style durations). Measurement units referring to a spatial distance on the page are sometimes called Length units.

Top ten web hosting - JavaScript Programmer’s Reference Function Object Type Description log()

Monday, November 19th, 2007

JavaScript Programmer’s Reference Function Object Type Description log() Math Function Natural log of a number LOG10E Math Constant Log to the base 10 of e LOG2E Math Constant Log to the base 2 of e max() Math Function Maximum of two values MAX_VALUE Number Constant Maximum numeric value min() Math Function Minimum of two values MIN_VALUE Number Constant Minimum numeric value NaN Number Constant Not a number NEGATIVE_INFI NITY Number Constant Negative infinity parseFloat() Global Function Floating point parser parseInt() Global Function Integer parser PI Math Constant The value of PI POSITIVE_INFI NITY Number Constant Positive infinity pow() Math Function A value rased to the power of another random() Math Function A random value round() Math Function Truncating round sin() Math Function Sine of an angle sqrt() Math Function Square root SQRT1_2 Math Constant Square root of one half SQRT2 Math Constant Square root of two tan() Math Function Tangent of an angle You should avoid the use of any of these function names as identifiers unless you are intentionally overriding their behavior by adding function properties (methods) to a prototype. See also: Arithmetic operator, Error, Integer arithmetic, Integer-value-remainder, Operator, Power function, Range error, Trigonometric function Matrix() (Filter/visual) A means of applying sophisticated rotation, translate, and scaling effects to an image using matrix transformation. Availability: JScript 5.5 Internet Explorer 5.5 Refer to: Filter Matrix() 1424

M Mathematics (Definition) Special boundary conditions that

Monday, November 19th, 2007

M Mathematics (Definition) Special boundary conditions that affect the results are: Argument Result +infinity NaN -infinity NaN 0 0 NaN NaN The exact value yielded by this function may vary slightly from implementation to implementation due to differences in the underlying precision of the implementations, math routines, and the specific algorithm selected to evaluate this function. Math object, Math.acos(), Math.asin(), Math.atan(), Math.atan2(), Math.cos(), Math.sin(), Trigonometric function See also: Cross-references: ECMA 262 edition 2 section 15.8.2.18 ECMA 262 edition 3 section 15.8.2.18 Mathematics (Definition) Mathematical support. The following table summarizes the support for mathematical computation in JavaScript: Function Object Type Description abs() Math Function Absolute value of a number acos() Math Function Inverse cosine asin() Math Function Inverse sine atan() Math Function Inverse tangent atan2() Math Function Inverse tangent of a slope ceil() Math Function Round up cos() Math Function Cosine of an angle E Math Constant Exponential constant exp() Math Function Exponent function floor() Math Function Round down isFinite() Global Function Test for infinity isNaN() Global Function Test for Not-a-Number LN10 Math Constant Natural log of 10 LN2 Math Constant Natural log of 2 Table continued on following page 1423

Cheapest web hosting - JavaScript Programmer’s Reference Property/method value type: Number primitive

Sunday, November 18th, 2007

JavaScript Programmer’s Reference Property/method value type: Number primitive JavaScript syntax: -Math.SQRT2 This constant provides the value of the square root of 2. The resulting value returned is approximately 1.414213562373095 (to 15 d.p.) Warnings: . Note that Math.SQRT1_2 may not be exactly equal to the reciprocal of Math.SQRT2. See also: Arithmetic constant, Floating point constant, Math object, Math.SQRT1_2 Property attributes: ReadOnly, DontDelete, DontEnum. Cross-references: ECMA 262 edition 2 section 15.8.1.8 ECMA 262 edition 3 section 15.8.1.8 Math.tan() (Function) The tangent of the input argument. 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: Number primitive JavaScript syntax: -Math.tan(aValue) Argument list: aValue An angle measured in radians This function returns the tangent of the input argument. The argument value must be expressed in radians. 1422

M Math.SQRT1_2 (Constant/static) Math.SQRT1_2 (Constant/static) A mathematical (Web server hosting)

Saturday, November 17th, 2007

M Math.SQRT1_2 (Constant/static) Math.SQRT1_2 (Constant/static) A mathematical constant value. 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: Number primitive JavaScript syntax: -Math.SQRT1_2 This constant returns the numeric value of the square root of 0.5. The resulting value returned is approximately 0.707106781186548 (to 15.d.p.) Warnings: . Note that the value of Math.SQRT1_2is approximately the reciprocal of the value of Math.SQRT2. The word approximately is used here, because the mathematical accuracy of JavaScript implementations leaves something to be desired and there are some strange artifacts in some of the calculations. See also: Arithmetic constant, Floating point constant, Math object, Math.SQRT2 Property attributes: ReadOnly, DontDelete, DontEnum. Cross-references: ECMA 262 edition 2 section 15.8.1.7 ECMA 262 edition 3 section 15.8.1.7 Math.SQRT2 (Constant/static) A mathematical constant value. ECMAScript edition 2 JavaScript 1.0 JScript 1.0 Internet Explorer 3.02 Netscape 2.0 Netscape Enterprise Server 2.0 Opera 3.0 1421 Availability:

JavaScript Programmer’s Reference // (Cheap web hosting) Register the new function

Friday, November 16th, 2007

JavaScript Programmer’s Reference // Register the new function Math.constructor.prototype.sinh = sinh; // Test the Math.sinh() method document.write(Math.sinh(2)); document.write(”
“); Math.sqrt() (Function) The square root of the input argument. 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: Number primitive JavaScript syntax: -Math.sqrt(aValue) Argument list: aValue A meaningful numeric value This function computes the square root of the input argument. Special boundary conditions that affect the results are: Argument Result +infinity +infinity 0 0 < 0 NaN NaN NaN The exact value yielded by this function may vary slightly from implementation to implementation, due to differences in the underlying precision of the implementations, math routines, and the specific algorithm selected to evaluate this function. See also: Math object, Math.pow() Cross-references: ECMA 262 edition 2 section 15.8.2.17 ECMA 262 edition 3 section 15.8.2.17 1420