Table of Contents:
Netscape Unsupported Functions

Workarounds Available:
 
===
accessKey
Add
all
altKey
background
clear
contains
createElement
ctrlKey
dataFld
dataSrc
dialogArguments
dialogHeight
dialogLeft
dialogTop
dialogWidth
Dictionary
dimensions
elementFromPoint
execCommand
execScript
Exists
expand
fromElement
getAttribute
getFullYear
getItem
getMilliseconds
getUTCDate
getUTCDay
getUTCFullYear
getUTCHours
getUTCMilliseconds
getUTCMinutes
getUTCMonth
getUTCSeconds
id
Infinity
innerHTML
innerText
insertAdjacentHTML
insertAdjacentText
isFinite
isTextEdit
Item
Items
keyCode
lang
lastIndex
lbound
moveFirst
moveNext
navigate
offsetHeight
offsetLeft
offsetParent
offsetTop
offsetWidth
offsetX
offsetY
onafterupdate
onbeforeunload
onbeforeupdate
ondragstart
onhelp
onreadystatechange
onrowenter
onscroll
onselectstart
outerHTML
outerText
parentElement
parentTextEdit
parentWindow
queryCommandEnabled
queryCommandIndeterm
queryCommandState
queryCommandSupported
queryCommandValue
readyState
reason
recordNumber
Regular Expression
removeAttribute
returnValue
scripts
scrollIntoView
setFullYear
setMilliseconds
setUTCDate
setUTCFullYear
setUTCHours
setUTCMilliseconds
setUTCMinutes
setUTCMonth
setUTCSeconds
shiftKey
showHelp
showModelDialog
sourceIndex
srcElement
srcFilter
style
styleSheets
tabIndex
tagName
toArray
toElement
ubound
VBArray
x
y

No Workarounds Available:
 
!==
@cc_on
@if
@set
A
ActiveXObject
Add
ADDRESS
assign
atEnd
AtEndOfLine
AtEndOfStream
Attributes
AvailableSpace
B
BASE
BASEFONT
bgProperties
BGSOUND
BLOCKQUOTE
bottomMargin
BR
bufferDepth
BuildPath
CAPTION
CENTER
CITE
className
client
clientHeight
clientWidth
clientX
clientY
CODE
COL
COLGROUP
collapse
colorDepth
Column
compareEndPoints
cookieEnabled
Copy
CopyFile
CopyFolder
Count
CreateFolder
createRange
CreateTextFile
createTextRange
dataFormatAs
DateCreated
DateLastAccessed
DateLastModified
DD
Delete
DeleteFile
DeleteFolder
DFN
DIR
disabled
DIV
DL 
Drive
Drive
DriveExists
DriveLetter
Drives
DriveType
DT
duplicate
EM
EMBED
empty
Enumerator
FIELDSET
File
file
FileExists
Files
FileSystem
FileSystemObject
filters
findText
Folder
FolderExists
FreeSpace
GetAbsolutePathName
GetBaseName
getBookmark
GetDrive
GetDriveName
GetExtensionName
GetFile
GetFileName
GetFolder
GetObject
GetParentFolderName
GetSpecialFolder
GetTempName
getVarDate
Global
global
H1
H2
H3
H4
H5
H6
HEAD
HR
HTML
htmlText
I
IFRAME
ignoreCase
IMG
INPUT
inRange
isEqual
IsReady
IsRootFolder
KBD
Key
Keys
LABEL
leftMargin
LEGEND
LI
Line
LISTING
MAP
MARQUE
MENU
META
Move
moveEnd
MoveFile
MoveFolder
moveStart
moveToBookmark
moveToElementText
moveToPoint
NEXTID
Object
OL
OpenAsTextStream
OpenTextFile
P
ParentFolder
pasteHTML
Path
PLAINTEXT
PRE
Read
ReadAll
ReadLine 
readOnly
Remove
RemoveAll
rightMargin
RootFolder
S
SAMP
SCRIPT
ScriptEngine
ScriptEngineBuildVersion
ScriptEngineMajorVersion 
ScriptEngineMinorVersion
scrollHeight
scrollLeft
scrollTop
scrollWidth
SerialNumber
setEndPoint
ShareName
ShortName
ShortPath
Size
Skip
SkipLine
source
SPAN
STRONG
STYLE
SubFolders
TABLE
tags
TBODY
TD
TextRange
TextStream
TFOOT
TH
THEAD
topMargin
TotalSize
toUTCString
TR
TT
U
UL
updateInterval
VolumeName
WriteBlankLines
WriteLine
XMP

colorDepth, cookieEnabled, pasteHTML, setEndPoint, disabled, htmlText, tags, leftMargin, filters, readOnly, rightMargin, topMargin, updateInterval, assign, Key, Keys, collapse, compareEndPoints, createRange, createTextRange, duplicate, empty, file, findText, bgProperties, getBookmark, bottomMargin, inRange, bufferDepth, isEqual, className, moveEnd, client, moveStart, clientHeight, moveToBookmark, clientWidth, TextRange, moveToElementText

Areas Affected:
JScript Functions



Background Information:
JScript fucntions whose extensions from JavaScript have not been adopted by Netscape's JavaScript 1.2 and below mostly due to the close link between these functions and the browser.



Workaround:
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
JavaScript 1.0 No Workaround exists

Table of Contents
navigate, parentElement, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported, queryCommandValue, dialogArguments, dialogHeight, dialogLeft, dialogTop, dialogWidth, showHelp, showModelDialog, parentWindow, readyState, all, scripts, styleSheets, returnValue, clear, createElement, elementFromPoint, execCommand, execScript, expand, background

Area Affected
Microsoft's objects:
document's properties: bgColor, charset, activeElement, aLinkColor, BODY, cookie, defaultCharset, domain, expand, fgColor, fileCreatedDate, fileModifiedDate, fileSize, lastModified, linkColor, location, parentWindow, protocol, readyState, selection, TITLE, uniqueID, URL, vlinkColor
document's colletions: all, anchors, children, embeds, forms, frames, images, links, scripts, styleSheets
document's methods: attachEvent, clear, close, createElement, createStyleSheet, detachEvent, elementFromPoint, execCommand, open, queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported, queryCommandValue, recalc, write, writeln.
document's events: onclick, ondblclick, ondrag, ondragend, ondragenter, ondragleave, ondragover, ondragstart, ondrop, onhelp, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, on mouseout, onmouseover, onmouseup, onpropertychange, onreadystatechange
window's properties: name, clientInformation, closed, complete, defaultStatus, dialogArguments, dialogHeight, dialogLeft, dialogTop, dialogWidth, document, event, external, frames, history, length, location, navigator, offscreenBuffering, opener, parent, returnValue, screen, screenLeft, screenTop, self, status, top
window's methods: alert, attachEvent, blur, clearInterval, clearTimeout, close, confirm, detachEvent, execScript, focus, moveBy, moveTo, navigate, open, prompt, resizeBy, resizeTo, scroll, scrollBy, scrollTo, setInterval, setTimeout, showHelp, showModelDialog
window's events: onbeforeunload, onblur, onerror, onfocus, onhelp, onload, onresize, onunload.

Netscape's document object:
document's properties: alinkColor, anchors, applets, bgColor, cookie, domain, embeds, fgColor, formName, forms, images, lastModified, layers, linkColor, links, plugins, referrer, title, URL, vlinkColor.
document's methods: captureEvents, close, getSelection, handleEvent, open, releaseEvents, routeEvent, write, writeln.
document's events: onClick, onDblClick, onKeyDown, onKeypress, onKeyUp, onMouseDown, onMouseUp
window's properties: closed, defaultStatus, document, frames, history, innerHeight, innerWidth, length, location, locationbar, menubar, name, opener, outerHeight, outerWidth, pageXOffset, pageYOffset, parent, personalbar, scrollbars, self, status, statusbar, toolbar, top, window
window's methods: alert, back, blur, captureEvents, clearInterval, clearTimeout, close, confirm, disableExternalCapture, enableExternalCapture, find, focus, forward, handleEvent, home, moveBy, moveTo, open, print, prompt, releaseEvents, resizeBy resizeTo, routeEvent, scroll, scrollBy, scrollTo, setInterval, setTimeout, stop
window's events: onBlur, onDragDrop, onError, onFocus, onLoad, onMove, onResize, onUnload

CSS Properties
Font and Text Properties: fontFamily, fontSize, fontStyle, fontVariant, fontWeight, font, letterSpacing, lineHeight, wordSpacing, textAlign, textDecoration, textIndent, textTransform, verticalAlign
Colors and Background Properties: color, backgroundAttachment, backgroundColor, backgroundImage, backgroundPosition, backgroundRepeat, background
Box/Layout Properties: borderBottomColor, borderLeftColor, borderRightColor, borderTopColor, borderColor, borderBottomStyle, borderLeftStyle, borderRightStyle, borderTopStyle, borderStyle, borderBottomWidth, borderLeftWidth, borderRightWidth, borderTopWidth, borderWidth, borderBottom, borderLeft, borderRight, borderTop, border, clear, float, marginBottom, marginLeft, marginRight, marginTop, margin, paddingBottom, paddingLeft, paddingRight, paddingTop, padding
Positioning Properties: clop, height, left, overflow, position, top, visibility, width, zIndex
Other Properties: display, cursor, listStyleImage, listStylePosition, listStyleType, listStyle



Background
Dynamic HTML gives the developer full control over their web page. Dynamic HTML in Microsoft's Internet Explorer 4.0 provides complete access to every element, every style, all the content on the page, as well as any user event anywhere on the page.
Netscape Navigator 4.0 on the other hand, only supports events on a few elements and support for CSS-Positioning, and does not have the ability to change the style nor access the content on the page.
Therefore, when designing for both browsers, you need to look for a common ground or you need to clearly understand the browser's capabilities and work around them as appropriate. The common ground for Dynamic HTML is CSS Positioning. While the syntax for positioning elements is the same, the object model for animating and responding to user events is different.



Workaround
This is why DHTMLLib is designed. DHTMLLib is a cross-browser solution for developing pages with CSS positioning. Different from most cross-browser solutions, DHTMLLib not only allows you to animate positioned elements, but you also have access to the user's events. For events, Internet Explorer's powerful event bubbling model is emulated in Netscape for positioned elements, allowing you to write generic, reusable code.
With this library, it resolves most of the incompatibility issues regarding layers, CSS positioning, event handling, write your code with IE4's object model (DOM) and it will run on both 4.0 browsers.

To use this library, you need to include the file, http://www.insidedhtml.com/positioning/dhtmlLib.js, in your script as follows:
<SCRIPT SRC="http://www.insidedhtml.com/positioning/dhtmllib.js" LANGUAGE="Javascript"></SCRIPT>



References
Article "DHTML Library", http://www.insidedhtml.com/positioning/home.htm

Table of Contents
A, ADDRESS, B, BASE, BASEFONT, BGSOUND, BLOCKQUOTE, BR, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, DD, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, H1, H2, H3, H4, H5, H6, HEAD, HR, HTML, I, IFRAME, IMG, INPUT, KBD, LABEL, LEGEND, LI, LISTING, MAP, MARQUE, MENU, META, NEXTID, OL, P, PLAINTEXT, PRE, S, SAMP, SCRIPT, SPAN, STRONG, STYLE, TABLE, TBODY, TD, TFOOT, THTHEAD, TR, TT, U, UL, XMP

Areas Affected:
DOM 1.0 HTML Objects



Background Information:
Part of the DOM 1.0 Object model is HTML element objects. All HTML tags within DOM 1.0 have an object context containing properties, methods, and events. JavaScript can not re-create the same object model and therefore there are no workarounds.



Workaround:
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists

Table of Contents

scrollTop, scrollLeft, scrollHeight, scrollWidth
Areas Affected:
DOM 1.0 HTML Objects



Background Information:

ScrollTop, ScrolLeft - sets or retrieves the distance, in pixels, between the top or left edge respectively of the element and the topmost or leftmost portion respectively of the element that is currently visible in the window. This is equal to the horizontal distance that the content of the element has been scrolled.

ScrollHeight, ScrollWidth - Returns the element's scrolling height or width, in pixels. This is the distance between the top and bottom edges of the element's visible content. The physical height of the content, including the nonvisible content, can be obtained with the offsetHeight property.



Workaround:
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists

Table of Contents

dataFormatAs
Areas Affected:
DOM 1.0 HTML Objects



Background Information:
Specifies how the data supplied to the element should be rendered.



Workaround:
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists

Table of Contents

innerHTML, innerText, removeAttribute, isTextEdit, scrollIntoView, dataFld, dataSrc, marginHeight, marginWidth, parentTextEdit, recordNumber, id, lang, outerHTML, insertAdjacentHTML, insertAdjacentText, tagName, accessKey, contains, tabIndex, getAttribute, style, sourceIndex, outerText
offsetHeight, offsetLeft, offsetParent, offsetTop, offsetWidth

Areas Affected:
Layer’s Properties: above, background, bgColor, below, clip.bottom, clip.height, clip.left, clip.right, clip.top, clip.width, document, left, name, pageX, pageY, parentLayer, siblingAbove, siblingBelow, src, top, visibility, zIndex
Layer’s Methods: captureEvents, handleEvent, load, moveAbove, moveBy, moveTo, moveToAbsolute, releaseEvents, resizeBy, resizeTo, routeEvent.
Layer’s Events: onBlur, onFocus, onLoad, onMouseOut, onMouseOver.

IFrame’s Properties: accessKey, align, dataFld, dataSrc, frameBorder, frameSpacing, hspace, id, lang, language, marginHeight, marginWidth, name, noResize, scrolling, src, style, tabIndex, title, vspace, innerHTML, innerText, isTextEdit, offsetHeight, offsetLeft, offsetParent, offsetTop, offsetWidth, outerHTML, outerText, parentElement, parentTextEdit, recordNumber, sourceIndex, style, tagName, uniqueID
IFrame’s Methods: attachEvent, blur, contains, detashEvent, focus, getAttribute, insertAdjacentHTML, insertAdjacentText, removeAttribute, scrollIntoView, setAttribute



Background Information:
Both NN4 specific Layer element and IE4/HTML 4 IFrame element allow you to place content at an absolute position and embed other documents within one’s web page. However, there are some significant differences between these two elements which make them not fully interchangeable.


Workaround:
In the article “Targeting Layers”, , the author gives Layers and IFrames dual identities. And shows how to make layers act as a link target just like a frame and make IFrames remove their border and automatically size to their contents.

Targeting Layers: http://www.insidedhtml.com/tips/contents/ts10/page1.asp

Table of Contents

moveToPoint

Areas Affected:
DOM 1.0 Object



Background Information:
Moves the start and end positions of the text range to the given point. The coordinates of the point must be in pixels and be relative to the upper-left corner of the window. The resulting text range is empty, but can be expanded and moved using methods such as expand and moveEnd.



Workaround:
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists

Table of Contents

onafterupdate, onbeforeunload, onbeforeupdate, ondragstart, onhelp, onreadystatechange, onrowenter, shiftKey, reason, keyCode, fromElement, onscroll, onselectstart, ctrlKey, toElement, altKey, button, cancelBubble, y, x, srcFilter, srcElement, offsetX, offsetY, reason, clientX, clientY

Areas Affected:
Events, Event Handler, Event Model
Microsoft’s Event Model:
event object’s properties: altKey, button, cancelBubble, clientX, clientY, ctrlKey, dataFld, dataTransfer, fromElement, keyCode, offsetX, offsetY, propertyName, reason, recordset, returnValue, screenX, screenY, shiftKey, srcElement, srcFilter, toElement, type, x, y.
Microsoft’s Events: onabort, onafterupate, onbeforecopy, onbeforecut, onbeforepaste, onbeforeunload, onbeforeupdate, onblur, onbounce, oncellchange, onchange, onclick, oncopy, oncut, ondataavailable, ondatasetchanged, ondatasetcomplete, ondblclick, ondrag, ondragend, ondragenter, ondragleave, ondragover, ondragstart, ondrop, onerror, onerrorupdate, onfilterchange, onfinish, onfocus, onhelp, onkeydown, onkeypress, onkeyup, onload, onlosecapture, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onpaste, onpropertychange, onreadystatechange, onreset, onresize, onrowenter, onrowexit, onrowsdelete, onrowsinserted, onscroll, onselect, onselectstart, onstart, onsubmit, onunload.

Netscape’s Event Model:
event object’s properties: data, height, layerX, layerY, modifiers, pageX, pageY, screenX, screenY, target, type, which, width
Netscape’s Events: onAbort, onBlur, onChange, onClick, onDblClick, onDragDrop onError, onFocus, onKeyDown, onKeyPress, onKeyUp, onLoad, onMouseDown, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onMove, onReset, onResize, onSelect, onSubmit, onUnload



Background Information:
Netscape’s JavaScript 1.2 has a very different event model from Internet Explorer’s. In fact, they are reversed. For example, clicking on a hypertext link would cause the following event handlers to be called:

Microsoft:
1. Link
2. Layer
3. document
4. window
5. default handler
Netscape:
1. Window
2. document
3. layer
4. link
5. default handler

Microsoft uses an event bubbling model. Event bubbling is a process in which the object associated with where the event happened receives the event first. This object then choose to process the event or pass it along to its parent object.
NN4 uses an event capturing model, the opposite of an event bubbling model. Rather than events being generated by the bottommost object in the hierarchy, then bubbled up, events in the event capturing model are generated at the top of the object hierarchy and then fall through to events lower in the hierarchy.  A limited number of page elements can generate and process events. For example, onMouseOver is handled only images and links.



Workaround:

To write scripts that will work in both browsers, don’t use the feature of passing any events to parent event handlers, since the passing order is reversed in the two browsers.  Instead, handle each event in a single function.  Also, use only the events defined for the Netscape browser, since those will work in both.

References
1) Bubble Power: Event Handling in Internet Explorer 4.0 http://www.microsoft.com/workshop/author/script/ie4event.asp
2) Dynamic HTML and The New Event Models http://www.dhtmlzone.com/articles/eventmodels.html
3) Cross Browser Dynamic HTML http://www.dhtmlzone.com/articles/dhtml.html

Table of Contents

lbound

Areas Affected:
JScript 3.0 Function - VBArray Object



Background Information:
Returns the lowest index value used in the specified dimension of a VBArray.



Workaround:
 
Javascript 1.2 See JavaScript 1.1 entry
Javascript 1.1 Since the array object within the JavaScript 1.1 API can only have a lower bound of 0, this functionality can not be worked around.
Javascript 1.0 No Workaround exists
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

getVarDate

Areas Affected:
JScript 3.0 Function - Date Object



Background Information:
The getVarDate method is used when interacting with ActiveX® objects or other objects that accept and return date values in VT_DATE format.



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents

@cc_on

Areas Affected:
JScript 3.0 Function - General Function



Background Information:
The @cc_on statement activates conditional compilation in the scripting engine.
It is strongly recommended that you use the @cc_on statement in a comment, so that browsers that do not support conditional compilation will accept your script as valid syntax:

/*@cc_on*/
...
(remainder of script)

Alternatively, an @if or @set statement outside of a comment also activates conditional compilation.



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

@if

Areas Affected:
JScript 3.0 Function - General Function



Background Information:
Conditionally executes a group of statements, depending on the value of an expression.

Syntax
@if (condition1)
     text1
[@elif (condition2)
     text2]
[@else
     text3]
@end

When you write an @if statement, you don't have to place each clause on a separate line. You can use multiple @elif clauses, however, all @elif clauses must come before an @else clause. You commonly use the @if statement to determine which text among several options should be used for text output.



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

@set

Areas Affected:
JScript 3.0 Function - General Function



Background Information:
Numeric and Boolean variables are supported for conditional compilation. Strings are not. Variables created using @set are generally used in conditional compilation statements, but can be used anywhere in JScript code.


Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents

GetObject

Areas Affected:
JScript 3.0 Function - General Object



Background Information:
Use the GetObject function to access an Automation object from a file. Assign the object returned by GetObject to the object variable.

Example:
var CADObject;
CADObject = GetObject("C:\\CAD\\SCHEMA.CAD");

When this code is executed, the application associated with the specified pathname is started, and the object in the specified file is activated. If pathname is a zero-length string (""), GetObject returns a new object instance of the specified type. If the pathname argument is omitted, GetObject returns a currently active object of the specified type. If no object of the specified type exists, an error occurs.

Some applications allow you to activate part of a file. Add an exclamation point (!) to the end of the file name and follow it with a string that identifies the part of the file you want to activate. For information on how to create this string, see the documentation for the application that created the object.



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents

ActiveXObject

Areas Affected:
JScript 3.0 Object 



Background Information:
Automation servers provide at least one type of object. For example, a word-processing application may provide an application object, a document object, and a toolbar object. To create an Automation object, assign the new ActiveXObject to an object variable:

var ExcelSheet;
ExcelSheet = new ActiveXObject("Excel.Sheet");

This code starts the application creating the object (in this case, a Microsoft Excel worksheet). Once an object is created, you refer to it in code using the object variable you defined.



Workaround:
 
Javascript 1.2 Absolutely no way of using an ActiveX Object
Javascript 1.1 Absolutely no way of using an ActiveX Object
Javascript 1.0 Absolutely no means of using an ActiveX Object
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

isFinite

Areas Affected:
JScript 3.0 Function - Global Object



Background Information:
The isFinite method returns true if number is any value other than NaN, negative infinity, or positive infinity. In those three cases, it returns false.



Workaround:
 
Javascript 1.2 See JavaScript 1.0 entry
Javascript 1.1 See JavaScript 1.0 entry
Javascript 1.0 function _isFinite( n ) { 
        if( ( n != n ) ||                       // property of NaN 
                 n > Number.MAX_VALUE ||        // POS_INF 
                 n < Number.MIN_VALUE ) {       // NEG_INF 
                return false; 
        } else { 
                return true; 
        } 
}
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents

===

Areas Affected:
JScript 3.0 Function



Background Information:
Identity (===. !==)
These operators behave identically to the equality operators except no type conversion is done, and the types must be the same to be considered equal.


Workaround:
 
Javascript 1.2 See JavaScript 1.0 entry
Javascript 1.1 See JavaScript 1.0 entry
Javascript 1.0
function areIdentical( obj1, obj2 ) {
        return ( ( obj1 == obj2 ) 
                && ( typeof( obj1 ) == typeof( obj2 ) ) );
}
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

!==

Areas Affected:
JScript 3.0 Function



Background Information:
Identity (===. !==)
These operators behave identically to the equality operators except no type conversion is done, and the types must be the same to be considered equal.



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents

ubound

Areas Affected:
JScript 3.0 Function - VBArray Object



Background Information:
VBArray returns the upper limit of a VBArray object.


Workaround:
 
Javascript 1.2 See JavaScript 1.1 entry
Javascript 1.1 Array object available with JavaScript 1.1 Object. 

Within the Array Object, all functionality provided within the VBArray object can be mimicked. 

Multiple dimensional arrays are possible by nesting array objects within a new Array object. For each element, the length of the array object can be found which would provide the dimension for that set. 

function ubound(level, arrayIn)

   var tempArray = new Array() 
   tempArray = arrayIn[level]; 

   return tempArray.length; 

row1 = new Array(2); 
row2 = new Array(3); 

rows = new Array(row1, row2); 

alert(ubound(0, rows)); 

Returns a value of 2 - the upper bound of the first array element. 

Javascript 1.0 No Workaround exists
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

toArray

Areas Affected:
JScript 3.0 Function - VBArray Object



Background Information:
Converts a VBArray to a standard JScript array.



Workaround:
 
Javascript 1.2 Using the Array object and the concat method, one could easily mimic this functionality. 
The concat method blends two arrays together and returns one JScript array. 

Example: 

function toArray(arrayIn) 

   var tempArray = new Array(); 
   while(arrayIn.length > 2) 
   { 
       tempArray = arrayIn[arrayIn.length-1].concat(arrayIn[arrayIn.length]); 
       arrayIn[arrayIn.length-1] = tempArray; 
       arrayIn.length = arrayIn.length-1; 
   } 

This example could be expanded out to multi-dimensional arrays as well.

Javascript 1.1 See JavaScript 1.2 entry
Javascript 1.0 No Workaround exists
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

getItem

Areas Affected:
JScript 3.0 Function - VBArray Object



Background Information:
Retrieves the item at the specified location.



Workaround:
 
Javascript 1.2 See JavaScript 1.1 entry
Javascript 1.1 Array object available with JavaScript 1.1 Object. 

Within the Array Object, all functionality provided within the VBArray object can be mimicked. 

Multiple dimensional arrays are possible by nesting array objects within a new Array object. For each element, the length of the array object can be found which would provide the dimension for that set. 

function getItem(level, arrayIn, pos) 

   var tempArray = new Array(); 
   tempArray = arrayIn[level]; 
   return tempArray[pos]; 

row1 = new Array(1, 2, 3); 
row2 = new Array(4, 5, 6, 7); 

rows = new Array(row1, row2); 

alert(getItem(0, rows, 0)); 

Returns a value of 1 - the first element in row1.

Javascript 1.0 No Workaround exists
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

slice

Areas Affected:
JScript 3.0 Function - String Object



Background Information:



Workaround:
 
Javascript 1.2 Slice is part of the String object and has identical functionality as that in JScript 3.0
Javascript 1.1 function myStringSlice( str1, begin, end ) { 

        // check number of arguments passed into the function 
        if( myStringSlice.arguments.length < 2 ) { 
                return null; 
        } else if( myStringSlice.arguments.length == 2 ) { 
                end = str1.length; 
        } 

        // deal with negative and large values of 'begin' and 'end' 
        if( end < 0 ) { 
                end = str1.length + end; 
        } else if( end > str1.length ) { 
                end = str1.length; 
        } 
        begin = ( begin < 0 ) ? 0 : begin; 

        // assert data passed in are valid 
        if( str1.length == 0 ||         // empty String 
                 begin >= str1.length ||// invalid begin index 
                 end <= begin ||     // invalid end index 
                 end == 0               // invalid end index 
        ) { 
                return null; 
        } 

        str2 = ""; 
        for( i = begin, j = 0; i < end; i++, j++ ) { 
                str2 += str1.charAt( i ); 
        } 
        return str2; 
}

Javascript 1.0 No Workaround exists
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

setFullYear

Areas Affected:
JScript 3.0 Function - Date Object



Background Information:
Sets the year value in the Date object according to local time.



Workaround:
 
Javascript 1.2 See JavaScript 1.0 entry
Javascript 1.1 See JavaScript 1.0 entry
Javascript 1.0
// d is the date object
function setFullYear( d, year, month, numDate ) {
        if( typeof( year ) == "number" ) {
                var newYear = new Date( year, 0, 1 );
                var oldYear = new Date( getFullYear( d ), 0, 1 );
                d.setTime( d.getTime() + newYear.getTime() 
                        - oldYear.getTime() );

                if( typeof( month ) == "number" ) {
                        date.setMonth( month );
                }
                if( typeof( numDate ) == "number" ) {
                        date.setDate( numDate );
                }
        }
        return date;
}
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

setMilliseconds

Areas Affected:
JScript 3.0 Function - Date Object



Background Information:
Modifies the milliseconds value stored in the Date object according to local time.



Workaround:
 
Javascript 1.2 See JavaScript 1.0 entry
Javascript 1.1 See JavaScript 1.0 entry
Javascript 1.0
//d is the date object, nMilliseconds is the number of milliseconds
function setMilliseconds( d, nMilliseconds ) {
        if( nMilliseconds >= 1000 || nMilliseconds < 0) {
                return null;
        }
        var date = new Date( d.getYear(), d.getMonth(), d.getDate(), 
                d.getHours(), d.getMinutes(), d.getSeconds() );
        d.setTime( date.getTime() + nMilliseconds );
        return date;
}
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

setUTCDate

Areas Affected:
JScript 3.0 Function - Date Object



Background Information:
Sets the numeric date of the Date object in Universal Coordinated Time (UTC). To set the date according to local time, use the setDate method.
If the value of numDate is greater than the number of days in the month stored in the Date object or is a negative number, the date is set to a date equal to numDate minus the number of days in the stored month. For example, if the stored date is January 5, 1996, and setUTCDate(32) is called, the date changes to February 1, 1996. Negative numbers have a similar behavior.

Example:

function SetUTCDateDemo(newdate)
{
  var d, s;
  d = new Date();
  d.setUTCDate(newdate);
  s = "Current setting is ";
  s += d.toUTCString();
  return(s);
}



Workaround:
 
Javascript 1.2 See JavaScript 1.0 entry
Javascript 1.1 See JavaScript 1.0 entry
Javascript 1.0
function setUTCDate( date, numDate ) {
        setUTCFullYear( date, null, null, numDate );
        return date;
}
function setUTCFullYear( date, year, month, numDate ) {
        var nTimezoneOffset = date.getTimezoneOffset() * 60 * 1000;

        date.setTime( date.getTime() + nTimezoneOffset );
        if( typeof( year ) == "number" ) {
                setFullYear( date, year );
        }
        if( typeof( month ) == "number" ) {
                date.setMonth( month );
        }
        if( typeof( numDate ) == "number" ) {
                date.setDate( numDate );
        }
        var a = date.getTime() - nTimezoneOffset;
        date.setTime( a );
        return date;
}
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

setUTCFullYear

Areas Affected:
JScript 3.0 Function - Date Object



Background Information:
Sets the year value in the Date object according to Universal Coordinated Time (UTC).


Workaround:
 
Javascript 1.2 See JavaScript 1.0 entry
Javascript 1.1 See JavaScript 1.0 entry
Javascript 1.0
function setUTCFullYear( date, year, month, numDate ) {
        var nTimezoneOffset = date.getTimezoneOffset() * 60 * 1000;

        date.setTime( date.getTime() + nTimezoneOffset );
        if( typeof( year ) == "number" ) {
                setFullYear( date, year );
        }
        if( typeof( month ) == "number" ) {
                date.setMonth( month );
        }
        if( typeof( numDate ) == "number" ) {
                date.setDate( numDate );
        }
        var a = date.getTime() - nTimezoneOffset;
        date.setTime( a );
        return date;
}
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

setUTCHours

Areas Affected:
JScript 3.0 Function - Date Object



Background Information:
Modifies the hours stored in the Date object according to Universal Coordinated Time (UTC). All set methods taking optional arguments use the value returned from corresponding get methods, if you do not specify an optional argument. For example, if the numMonth argument is optional, but not specified, JScript uses the value returned from the getMonth method.

If the value of an argument is greater than its range or is a negative number, other stored values are modified accordingly. For example, if the stored date is "Jan 5, 1996 00:00:00.00", and setUTCHours(30) is called, the date is changed to "Jan 6, 1996 06:00:00.00."



Workaround:
 
Javascript 1.2 See JavaScript 1.0 entry
Javascript 1.1 See JavaScript 1.0 entry
Javascript 1.0
function setUTCHours( date, hours, mins, secs, msecs ) {
        nTimezoneOffset = date.getTimezoneOffset() * 60 * 1000;
        date.setTime( date.getTime() + nTimezoneOffset );
        if( typeof( hours ) == "number" ) {
                date.setHours( hours );
        }
        if( typeof( mins ) == "number" ) {
                date.setMinutes( mins );
        }
        if( typeof( secs ) == "number" ) {
                date.setSeconds( secs );
        }
        if( typeof( msecs ) == "number" ) {
                setMilliseconds( date, msecs );
        }
        date.setTime( date.getTime() - nTimezoneOffset );
        return date;
}
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

setUTCMilliseconds

Areas Affected:
JScript 3.0 Function - Date Object



Background Information:
Modifies the milliseconds value stored in the Date object according to Universal Coordinated Time (UTC). To set the milliseconds according to local time, use the setMilliseconds method.

If the value of numMilli is greater than 999 or is a negative number, the stored number of seconds (and minutes, hours, and so forth, if necessary) is incremented an appropriate amount.



Workaround:
 
Javascript 1.2 See JavaScript 1.0 entry
Javascript 1.1 See JavaScript 1.0 entry
Javascript 1.0
function setUTCMilliseconds( date, msecs ) {
        setUTCHours( date, null, null, null, msecs );
        return date;
}
function setUTCHours( date, hours, mins, secs, msecs ) {
        nTimezoneOffset = date.getTimezoneOffset() * 60 * 1000;
        date.setTime( date.getTime() + nTimezoneOffset );
        if( typeof( hours ) == "number" ) {
                date.setHours( hours );
        }
        if( typeof( mins ) == "number" ) {
                date.setMinutes( mins );
        }
        if( typeof( secs ) == "number" ) {
                date.setSeconds( secs );
        }
        if( typeof( msecs ) == "number" ) {
                setMilliseconds( date, msecs );
        }
        date.setTime( date.getTime() - nTimezoneOffset );
        return date;
}
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

setUTCMinutes

Areas Affected:
JScript 3.0 Function - Date Object



Background Information:
Modifies the minutes value of the Date object according to Universal Coordinated Time (UTC).



Workaround:
 
Javascript 1.2 See JavaScript 1.0 entry
Javascript 1.1 See JavaScript 1.0 entry
Javascript 1.0
function setUTCMinutes( date, mins, secs, msecs ) {
        setUTCHours( date, null, min, secs, msecs  );
        return date;
}
function setUTCHours( date, hours, mins, secs, msecs ) {
        nTimezoneOffset = date.getTimezoneOffset() * 60 * 1000;
        date.setTime( date.getTime() + nTimezoneOffset );
        if( typeof( hours ) == "number" ) {
                date.setHours( hours );
        }
        if( typeof( mins ) == "number" ) {
                date.setMinutes( mins );
        }
        if( typeof( secs ) == "number" ) {
                date.setSeconds( secs );
        }
        if( typeof( msecs ) == "number" ) {
                setMilliseconds( date, msecs );
        }
        date.setTime( date.getTime() - nTimezoneOffset );
        return date;
}
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

setUTCMonth

Areas Affected:
JScript 3.0 Function - Date Object



Background Information:
Modifies the month stored in the Date object according to Universal Coordinated Time (UTC).



Workaround:
 
Javascript 1.2 See JavaScript 1.0 entry
Javascript 1.1 See JavaScript 1.0 entry
Javascript 1.0
function setUTCMonth( date, month, numDate ) {
        setUTCFullYear( date, null, month, numDate );
        return date;
}
function setUTCFullYear( date, year, month, numDate ) {
        var nTimezoneOffset = date.getTimezoneOffset() * 60 * 1000;

        date.setTime( date.getTime() + nTimezoneOffset );
        if( typeof( year ) == "number" ) {
                setFullYear( date, year );
        }
        if( typeof( month ) == "number" ) {
                date.setMonth( month );
        }
        if( typeof( numDate ) == "number" ) {
                date.setDate( numDate );
        }
        var a = date.getTime() - nTimezoneOffset;
        date.setTime( a );
        return date;
}
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

setUTCSeconds

Areas Affected:
JScript 3.0 Function - Date Object



Background Information:
Modifies the seconds value stored in the Date object according to Universal Coordinated Time (UTC).All set methods taking optional arguments use the value returned from corresponding get methods, if you do not specify an optional argument. For example, if the numMonth argument is optional, but not specified, JScript uses the value returned from the getMonth method.

If the value of an argument is greater than its range or is a negative number, other stored values are modified accordingly. For example, if the stored date is "Jan 5, 1996 00:00:00.00" and setSeconds(150) is called, the date is changed to "Jan 5, 1996 00:02:30.00."



Workaround:
 
Javascript 1.2 See JavaScript 1.0 entry
Javascript 1.1 See JavaScript 1.0 entry
Javascript 1.0
function setUTCSeconds( date, secs, msecs ) {
        setUTCHours( date, null, null, secs, msecs );
        return date;
}
function setUTCHours( date, hours, mins, secs, msecs ) {
        nTimezoneOffset = date.getTimezoneOffset() * 60 * 1000;
        date.setTime( date.getTime() + nTimezoneOffset );
        if( typeof( hours ) == "number" ) {
                date.setHours( hours );
        }
        if( typeof( mins ) == "number" ) {
                date.setMinutes( mins );
        }
        if( typeof( secs ) == "number" ) {
                date.setSeconds( secs );
        }
        if( typeof( msecs ) == "number" ) {
                setMilliseconds( date, msecs );
        }
        date.setTime( date.getTime() - nTimezoneOffset );
        return date;
}
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents

toUTCString

Areas Affected:
JScript 3.0 Function - Date Object



Background Information:
Converts the date to a string in Universal Coordinated Time (UTC).



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

dimensions

Areas Affected:
JScript 3.0 Function - VBArray Object



Background Information:
The latest release of JavaScript, 1.2, has functionality embedded into it for determining the number of arguments that will are expected for a function call. That feature comes in the form of functionName.arity.



Workaround:
 
Javascript 1.2 See JavaScript 1.1 entry
Javascript 1.1 Array object available with JavaScript 1.1 Object. 

Within the Array Object, all functionality provided within the VBArray object can be mimicked. 

Multiple dimensional arrays are possible by nesting array objects within a new Array object. For each element, the length of the array object can be found which would provide the dimension for that set. 

function dimension(level, arrayIn) 

   var tempArray = new Array() 
   tempArray = arrayIn[level]; 

   return tempArray.length; 

row1 = new Array(2); 
row2 = new Array(3); 

rows = new Array(row1, row2); 

alert(dimension(0, rows)); 

Returns a value of 2 - the length of the first array element. 
 

Javascript 1.0 No Workaround exists
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

lastIndex, source

Areas Affected:
JScript 3.0 Object - Regular Expression Variables



Background Information:
The value of the $1...$9 properties is modified whenever a successful parenthesized match is made. Any number of parenthesized substrings may be specified in a regular expression pattern, but only the nine most recent can be stored.



Workaround:
 
Javascript 1.2 Same as JScript 3.0 code
Javascript 1.1 RegExp Property - No Workaround exists
Javascript 1.0 RegExp Property - No Workaround exists
JScript 2.0 RegExp Property - No Workaround exists
JScript 1.0 RegExp Property - No Workaround exists
Table of Contents
 

Drive, Enumerator, File, Folder, Global, Object, VBArray, Attributes, AvailableSpace, DateCreated, DateLastAccessed, DateLastModified, Drive, DriveLetter, Drives, DriveType, Files, FileSystem, FreeSpace, global, ignoreCase, index, input, IsReady, IsRootFolder, Name, ParentFolder, Path, RootFolder, SerialNumber, ShareName, ShortName, ShortPath, Size, SubFolders, TotalSize, Type, VolumeName, Add, atEnd, BuildPath, Copy, CopyFile, CopyFolder, CreateFolder, Delete, DeleteFile, DeleteFolder, DriveExists, FileExists, FolderExists, GetAbsolutePathName, GetBaseName, GetDrive, GetDriveName, GetExtensionName, GetFile, GetFileName, GetFolder, GetParentFolderName, GetSpecialFolder, GetTempName, Move, MoveFile, moveFirst, MoveFolder, moveNext, OpenAsTextStream

Areas Affected:
Drive Object, Drives Object, Enumerator Object, File Object, Files Object, FileSystemObject Object, Folder Object, Folders Object, TextStream Object



Background Information:
These objects have been grouped together. All of these objects deal with direct file access which is not supported in JavaScript at all, or provide services at an object level which can not be provided in JavaScript. JavaScript 1.3 will provide functionality simliar to JScript 3.0.



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents

Infinity

Areas Affected:
JScript 3.0 Function - Global Object



Background Information:
Contains an initial value of Number.POSITIVE_INFINITY. The Infinity property is a member of the Global object, and is made available when the scripting engine is initialized.


Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 At the beginning of the script, insert the following code: 
Infinity = Number.POSITIVE_INFINITY;
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents

Regular Expression

Areas Affected:
JScript 3.0 Object - Regular Expression



Background Information:
Regular Expression objects store patterns used when searching strings for character combinations. After the Regular Expression object is created, it is either passed to a string method, or a string is passed to one of the regular expression methods. Information about the most recent search performed is stored in the RegExp object.


Workaround:
 
Javascript 1.2 Follows the regular expression structure that is common to JavaScript 1.2
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents

Write

Areas Affected:
JScript 3.0 Function - TextStream Object



Background Information:
Specified strings are written to the file with no intervening spaces or characters between each string. Use the WriteLine method to write a newline character or a string that ends with a newline character.



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

WriteBlankLines

Areas Affected:
JScript 3.0 Function - TextStream Object



Background Information:
Writes a specified number of newline characters to a TextStream file.



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

WriteLine

Areas Affected:
JScript 3.0 Function - TextStream Object



Background Information:
Writes a specified string and newline character to a TextStream file.



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

TextStream

Areas Affected:
JScript 3.0 TextStream Object



Background Information:
Facilitates sequential access to file.



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

Skip

Areas Affected:
JScript 3.0 Functions - TextStream Object



Background Information:
Skips a specified number of characters when reading a TextStream file.



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

SkipLine

Areas Affected:
JScript 3.0 Functions - TextStream Object



Background Information:
Skips the next line when reading a TextStream file.



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

ScriptEngine

Areas Affected:
JScript 3.0 Functions



Background Information:
Returns a string representing the scripting language in use.

The ScriptEngine function can return any of the following strings:
"JScript" =  Indicates that Microsoft JScript is the current scripting engine.
"VBA" = Indicates that Microsoft Visual Basic® for Applications is the current scripting engine.
"VBScript" = Indicates that Microsoft Visual Basic Scripting Edition is the current scripting engine.

Example:
function GetScriptEngineInfo()
{
    var s;
    s = ""; // Build string with necessary info.
    s += ScriptEngine() + " Version ";
    s += ScriptEngineMajorVersion() + ".";
    s += ScriptEngineMinorVersion() + ".";
    s += ScriptEngineBuildVersion();
    return(s);
}



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

ScriptEngineBuildVersion

Areas Affected:
JScript 3.0 Functions



Background Information:
Returns a string representing the build version of the scripting language in use.

The ScriptEngine function can return any of the following strings:
"JScript" =  Indicates that Microsoft JScript is the current scripting engine.
"VBA" = Indicates that Microsoft Visual Basic® for Applications is the current scripting engine.
"VBScript" = Indicates that Microsoft Visual Basic Scripting Edition is the current scripting engine.

Example:
function GetScriptEngineInfo()
{
    var s;
    s = ""; // Build string with necessary info.
    s += ScriptEngine() + " Version ";
    s += ScriptEngineMajorVersion() + ".";
    s += ScriptEngineMinorVersion() + ".";
    s += ScriptEngineBuildVersion();
    return(s);
}



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

ScriptEngineMajorVersion

Areas Affected:
JScript 3.0 Functions



Background Information:
Returns a string representing the major version of the scripting language in use.

The ScriptEngine function can return any of the following strings:
"JScript" =  Indicates that Microsoft JScript is the current scripting engine.
"VBA" = Indicates that Microsoft Visual Basic® for Applications is the current scripting engine.
"VBScript" = Indicates that Microsoft Visual Basic Scripting Edition is the current scripting engine.

Example:
function GetScriptEngineInfo()
{
    var s;
    s = ""; // Build string with necessary info.
    s += ScriptEngine() + " Version ";
    s += ScriptEngineMajorVersion() + ".";
    s += ScriptEngineMinorVersion() + ".";
    s += ScriptEngineBuildVersion();
    return(s);
}



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

ScriptEngineMinorVersion

Areas Affected:
JScript 3.0 Functions



Background Information:
Returns a string representing the minor version of the scripting language in use.

The ScriptEngine function can return any of the following strings:
"JScript" =  Indicates that Microsoft JScript is the current scripting engine.
"VBA" = Indicates that Microsoft Visual Basic® for Applications is the current scripting engine.
"VBScript" = Indicates that Microsoft Visual Basic Scripting Edition is the current scripting engine.

Example:
function GetScriptEngineInfo()
{
    var s;
    s = ""; // Build string with necessary info.
    s += ScriptEngine() + " Version ";
    s += ScriptEngineMajorVersion() + ".";
    s += ScriptEngineMinorVersion() + ".";
    s += ScriptEngineBuildVersion();
    return(s);
}



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

Read

Areas Affected:
JScript 3.0 Function - TextStream Object



Background Information:
Reads a specified number of characters from a TextStream file and returns the resulting string.



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

ReadAll

Areas Affected:
JScript 3.0 Function - TextStream Object



Background Information:
Reads an entire TextStream file and returns the resulting string.



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

ReadLine

Areas Affected:
JScript 3.0 Function - TextStream Object



Background Information:
Reads an entire line (up to, but not including, the newline character) from a TextStream file and returns the resulting string.



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

Remove

Areas Affected:
JScript 3.0 Function - Dictionary Object



Background Information:
Removes a key, item pair from a Dictionary object.
An error occurs if the specified key, item pair does not exist.

Example:

var a, d, i, s;              // Create some variables.
d = new ActiveXObject("Scripting.Dictionary");
d.Add ("a", "Athens");       // Add some keys and items
d.Add ("b", "Belgrade");
d.Add ("c", "Cairo");
d.Remove("b");               // Remove second pair.



Workaround:
 
Javascript 1.2 No Workaround exists.
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

RemoveAll

Areas Affected:
JScript 3.0 Function - Dictionary Object



Background Information:
The RemoveAll method removes all key, item pairs from a Dictionary object.



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

OpenTextFile

Areas Affected:
JScript 3.0 Function - TextStream Object



Background Information:
Opens a specified file and returns a TextStream object that can be used to read from, write to, or append to the file.



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

Line

Areas Affected:
JScript 3.0 - TextStream Object



Background Information:
Read-only property that returns the current line number in a TextStream file.
After a file is initially opened and before anything is written, Line is equal to 1.


Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

FileSystemObject

Areas Affected:
JScript 2.0 Object



Background Information:
Provides access to a computer's file system.

The following code illustrates how the FileSystemObject is used to return a TextStream object that can be read from or written to:

Example:
var fso = new ActiveXObject("Scripting.FileSystemObject");
var a = fso.CreateTextFile("c:\\testfile.txt", true);
a.WriteLine("This is a test.");
a.Close();



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

CreateTextFile

Areas Affected:
JScript 2.0 Functio - TextStream Object



Background Information:
Creates a specified file name and returns a TextStream object that can be used to read from or write to the file.



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

Count

Areas Affected:
JScript 2.0 Function - Dictionary Object



Background Information:
Returns the number of items in a collection or Dictionary object. Read-only.

Example:

function CountDemo()
{
  var a, d, i, s;                 // Create some variables.
  d = new ActiveXObject("Scripting.Dictionary");
  d.Add ("a", "Athens");          // Add some keys and items
  d.Add ("b", "Belgrade");
  d.Add ("c", "Cairo");
  a = (new VBArray(d.Keys()));    // Get the keys.
  s = "";
  for (i = 0; i < d.Count; i++)   //Iterate the dictionary.
  {
    s += a.getItem(i) + " - " + d(a.getItem(i)) + "<br>";
  }
  return(s);              // Return the results.
}
 



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

Column

Areas Affected:
JScript 2.0 Function - TextStream Object



Background Information:
Read-only property that returns the column number of the current character position in a TextStream file. After a newline character has been written, but before any other character is written, Column is equal to 1.

Example:

function GetColumn()
{
  var fso, f, m;
  var ForReading = 1, ForWriting = 2;
  fso = new ActiveXObject("Scripting.FileSystemObject");
  f = fso.OpenTextFile("c:\\testfile.txt", ForWriting, true);
  f.Write("Hello World!");
  f.Close();
  f = fso.OpenTextFile("c:\\testfile.txt", ForReading);
  m = f.ReadLine();
  return(f.Column);
}



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

AtEndOfLine

Areas Affected:
JScript 2.0 Function



Background Information:
Returns true if the file pointer is positioned immediately before the end-of-line marker in a TextStream file; false if it is not. Read-only.
The AtEndOfLine property applies only to TextStream files that are open for reading; otherwise, an error occurs.
The following code illustrates the use of the AtEndOfLine property:

function GetALine(filespec)
{
  var fso, a, s, ForReading;
  ForReading = 1, s = "";
  fso = new ActiveXObject("Scripting.FileSystemObject");
  a = fso.OpenTextFile(filespec, ForReading, false);
  while (!a.AtEndOfLine)
  {
    s += a.Read(1);
  }
  a.Close( );
  return(s);
}



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

AtEndOfStream

Areas Affected:
JScript 2.0 Function



Background Information:
Returns true if the file pointer is at the end of a TextStream file; false if it is not. Read-only.
The AtEndOfStream property applies only to TextStream files that are open for reading, otherwise, an error occurs.
The following code illustrates the use of the AtEndOfStream property:

function GetALine(filespec)
{
  var fso, f, s, ForReading;
  ForReading = 1, s = "";
  fso = new ActiveXObject("Scripting.FileSystemObject");
  f = fso.OpenTextFile(filespec, ForReading, false);
  while (!f.AtEndOfStream)
    s += f.ReadLine( );
  f.Close( );
  return(s);
}



Workaround:
 
Javascript 1.2 No Workaround exists
Javascript 1.1 No Workaround exists
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

Items

Areas Affected:
JScript 3.0 Function - Dictionary Object



Background Information:
Returns an array containing all the items in a Dictionary object.



Workaround:
 
Javascript 1.2 If you were to implement the equivalent dictionary object using Array elements, you would always have access to the array that held all of the elements within.
Javascript 1.1 See JavaScript 1.2 entry.
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

Item

Areas Affected:
JScript 2.0 Function - Dictionary Object



Background Information:
Sets or returns an item for a specified key in a Dictionary object. For collections, returns an item based on the specified key. Read/write. If key is not found when changing an item, a new key is created with the specified newitem. If key is not found when attempting to return an existing item, a new key is created and its corresponding item is left empty.


Workaround:
 
Javascript 1.2 Using the Array object, you could mimic the general functionality of the dictionary object. 

function add(arrayIn, addElement, value) 

  eval("arrayIn[\"" + addElement + "\"] = value"); 

function exists(arrayIn, element) 

   for(i = 0; i < arrayIn.length; i++) 
   { 
     if(eval("arrayIn[\"" + element + "\"]") != null) 
         return true; 
   } 
   return false; 

function item(arrayIn, keyword, newValue) 

    if(exists(arrayIn, keyword)) 
       arrayIn[keyword] = newValue; 
   else 
       add(arrayIn, keyword, newValue); 

 

Javascript 1.1 See JavaScript 1.2 entry.
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

Exists

Areas Affected:
JScript 2.0 Function - Dictionary Object



Background Information:
Returns true if a specified key exists in the Dictionary object, false if it does not.



Workaround:
 
Javascript 1.2 Using the Array object, you could mimic the general functionality of the dictionary object. 

function exists(arrayIn, element) 

   for(i = 0; i < arrayIn.length; i++) 
   { 
       if(arrayIn[i] == element) 
           return true; 
   } 
   return false; 
}

Javascript 1.1 See JavaScript 1.2 entry.
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents

Dictionary

Areas Affected:
JScript 2.0 Object



Background Information:
A Dictionary object is the equivalent of a PERL associative array. Items can be any form of data, and are stored in the array. Each item is associated with a unique key. The key is used to retrieve an individual item and is usually a integer or a string, but can be anything except an array.


Workaround:
 
Javascript 1.2 Using the Array object, you could mimic the general functionality of the dictionary object. Some of the useful functions could be coded such as: 
y.add ("a", "test"); 
if (y.Exists("a")) 

Add and exists are simply: 

function add(arrayIn, addElement) 

   var tempArray = new Array(arrayIn.length); 
   for(i = 0; i < arrayIn.length; i++) 
       tempArray[i] = arrayIn[i]; 

  arrayIn = new Array(tempArray.length+1); 
   for(i = 0; i < tempArray.length; i++) 
      arrayIn[i] = tempArray[i]; 
   arrayIn[arrayIn.length] = addElement; // must be the last element in array 

function exists(arrayIn, element) 

   for(i = 0; i < arrayIn.length; i++) 
   { 
       if(arrayIn[i] == element) 
           return true; 
   } 
   return false; 
}

Javascript 1.1 See JavaScript 1.2 entry.
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

Add

Areas Affected:
JScript 3.0 - Dictionary Object



Background Information:
Adds a key and item pair to a Dictionary object.

Example:
var d;
d = new ActiveXObject("Scripting.Dictionary");
d.Add("a", "Athens");
d.Add("b", "Belgrade");
d.Add("c", "Cairo");



Workaround:
 
Javascript 1.2 Using the Array object, you could mimic the general functionality of the dictionary object. 

function add(arrayIn, addElement) 

   var tempArray = new Array(arrayIn.length); 
   for(i = 0; i < arrayIn.length; i++)
       tempArray[i] = arrayIn[i]; 

  arrayIn = new Array(tempArray.length+1); 
   for(i = 0; i < tempArray.length; i++) 
      arrayIn[i] = tempArray[i]; 
   arrayIn[arrayIn.length] = addElement; // must be the last element in array 
}

Javascript 1.1 See JavaScript 1.2 entry.
Javascript 1.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents

getFullYear

Areas Affected:
JScript 3.0 Function - Date Object



Background Information:
The getFullYear method returns the year as an absolute number. For example, the year 1976 is returned as 1976. This avoids problems with dates occuring at the end of the 20th century.

Example:

function DateDemo()
{
  var d, s = "Today's UTC date is: ";
  d = new Date();
  s += (d.getMonth() + 1) + "/";
  s += d.getDate() + "/";
  s += d.getFullYear();
  return(s);
}



Workaround:
 
Javascript 1.2 See JavaScript 1.0 entry
Javascript 1.1 See JavaScript 1.0 entry
Javascript 1.0
// dateOBJ is a date object passed as a parameter. 
//The year is returned from this function.
function getFullYear( dateOBJ ) {
        nYear = date.getYear();
        if( 0 <= nYear <= 99 ) {
                nYear += 1900;
        }
        return nYear;
}
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents

getMilliseconds

Areas Affected:
JScript 3.0 Function - Date Object



Background Information:
Retrieves the number of milliseconds past the second from the milliseconds value stored in a Date object according to local time.



Workaround:
 
Javascript 1.2 See JavaScript 1.0 entry
Javascript 1.1 See JavaScript 1.0 entry
Javascript 1.0
// d is a date object. Function returns a Natural number.
function getMilliseconds( d ) {
        var date = new Date( d.getYear(), d.getMonth(), d.getDate(), 
                d.getHours(), d.getMinutes(), d.getSeconds() );
        return ( d.getTime() - date.getTime() );
}
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

getUTCDate

Areas Affected:
JScript 3.0 Function - Date Object



Background Information:
Returns the date of the month stored in a Date object according to Universal Coordinated Time (UTC).



Workaround:
 
Javascript 1.2 See JavaScript 1.0 entry
Javascript 1.1 See JavaScript 1.0 entry
Javascript 1.0 // pass in a date object
function getUTCDate( date ) {
return _convertToUTCDateObject( date ).getDate();
}

// Internal function that is required.
function _convertToUTCDateObject( date ) {
return new Date( date.getTime() 
+ date.getTimezoneOffset() * 60 * 1000 );
}

JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

getUTCDay

Areas Affected:
JScript 3.0 Function - Date Object



Background Information:
Returns the day of the month stored in a Date object according to Universal Coordinated Time (UTC).



Workaround:
 
Javascript 1.2 See JavaScript 1.0 entry
Javascript 1.1 See JavaScript 1.0 entry
Javascript 1.0 // pass in a date object
function getUTCDay( date ) {
return _convertToUTCDateObject( date ).getDay();
}

// Internal function that is required.
function _convertToUTCDateObject( date ) {
return new Date( date.getTime() 
+ date.getTimezoneOffset() * 60 * 1000 );
}

JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

getUTCFullYear

Areas Affected:
JScript 3.0 Function - Date Object



Background Information:
Returns the year stored in a Date object according to Universal Coordinated Time (UTC).



Workaround:
 
Javascript 1.2 See JavaScript 1.0 entry
Javascript 1.1 See JavaScript 1.0 entry
Javascript 1.0 // pass in a date object
function getUTCFullYear( date ) {
return getFullYear( _convertToUTCDateObject( date ) );
}

// Internal function that is required.
function _convertToUTCDateObject( date ) {
return new Date( date.getTime() 
+ date.getTimezoneOffset() * 60 * 1000 );
}

JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

getUTCHours

Areas Affected:
JScript 3.0 Function - Date Object



Background Information:
The getUTCHours method returns an integer between 0 and 23 indicating the number of hours since midnight. A zero occurs in two situations: the time is before 1:00:00 A.M., or a time was not stored in the Date object when the object was created. The only way to determine which situation you have is to also check the minutes and seconds for zero values. If they are all zeroes, it is nearly certain that the time was not stored in the Date object.

Example:

function UTCTimeDemo()
{
  var d, s = "Current Universal Coordinated Time (UTC) is: ";
  var c = ":";
  d = new Date();
  s += d.getUTCHours() + c;
  s += d.getUTCMinutes() + c;
  s += d.getUTCSeconds() + c;
  s += d.getUTCMilliseconds();
  return(s);
}



Workaround:
 
Javascript 1.2 See JavaScript 1.0 entry
Javascript 1.1 See JavaScript 1.0 entry
Javascript 1.0 // pass in a date object
function getUTCHours( date ) {
return _convertToUTCDateObject( date ).getHours();
}

// Internal function that is required.
function _convertToUTCDateObject( date ) {
return new Date( date.getTime() 
+ date.getTimezoneOffset() * 60 * 1000 );
}

JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

getUTCMilliseconds

Areas Affected:
JScript 3.0 Function - Date Object



Background Information:
Retrieves the number of milliseconds past the second from the milliseconds value stored in a Date object according to Universal Coordinated Time (UTC).



Workaround:
 
Javascript 1.2 See JavaScript 1.0 entry
Javascript 1.1 See JavaScript 1.0 entry
Javascript 1.0 // pass in a date object
function getUTCMilliseconds( date ) {
return getMilliseconds( _convertToUTCDateObject( date ) )
}

// Internal function that is required.
function _convertToUTCDateObject( date ) {
return new Date( date.getTime() 
+ date.getTimezoneOffset() * 60 * 1000 );
}

JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

getUTCMinutes

Areas Affected:
JScript 3.0 Function - Date Object



Background Information:
The getUTCMinutes method returns an integer between 0 and 59 equal to the number of minutes stored in the Date object. A zero occurs in two situations: the time is less than one minute after the hour, or a time was not stored in the Date object when the object was created. The only way to determine which situation you have is to also check the hours and seconds for zero values. If they are all zeroes, it is nearly certain that the time was not stored in the Date object.

Example:

function UTCTimeDemo()
{
  var d, s = "Current Universal Coordinated Time (UTC) is: ";
  var c = ":";
  d = new Date();
  s += d.getUTCHours() + c;
  s += d.getUTCMinutes() + c;
  s += d.getUTCSeconds() + c;
  s += d.getUTCMilliseconds();
  return(s);
}



Workaround:
 
Javascript 1.2 See JavaScript 1.0 entry
Javascript 1.1 See JavaScript 1.0 entry
Javascript 1.0 // pass in a date object
function getUTCMinutes( date ) {
return _convertToUTCDateObject( date ).getMinutes();
}

// Internal function that is required.
function _convertToUTCDateObject( date ) {
return new Date( date.getTime() 
+ date.getTimezoneOffset() * 60 * 1000 );
}

JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

getUTCMonth

Areas Affected:
JScript 3.0 Function - Date Object



Background Information:
The getUTCMonth method returns an integer between 0 and 11 indicating the month stored in the Date object. The integer returned is not the traditional number used to indicate the month. It is one less. If "Jan 5, 1996 08:47:00.0" is stored in a Date object, getUTCMonth returns 0.



Workaround:
 
Javascript 1.2 See JavaScript 1.0 entry
Javascript 1.1 See JavaScript 1.0 entry
Javascript 1.0 // pass in a date object
function getUTCMonth( date ) {
return _convertToUTCDateObject( date ).getMonth();
}

// Internal function that is required.
function _convertToUTCDateObject( date ) {
return new Date( date.getTime() 
+ date.getTimezoneOffset() * 60 * 1000 );
}

JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents
 

getUTCSeconds

Areas Affected:
JScript 3.0 Function - Date Object



Background Information:
The getUTCSeconds method returns an integer between 0 and 59 indicating the seconds value of the indicated Date object. A zero occurs in two situations: the time is less than one second into the current minute, or a time was not stored in the Date object when the object was created. The only way to determine which situation you have is to also check the minutes and hours for zero values. If they are all zeroes, it is nearly certain that the time was not stored in the Date object.



Workaround:
 
Javascript 1.2 See JavaScript 1.0 entry
Javascript 1.1 See JavaScript 1.0 entry
Javascript 1.0
// pass in a date object
function getUTCSeconds( date ) {
        return _convertToUTCDateObject( date ).getSeconds();
}
// Internal function that is required.
function _convertToUTCDateObject( date ) {
        return new Date( date.getTime() 
                + date.getTimezoneOffset() * 60 * 1000 );
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists
Table of Contents