Table of Contents:
Netscape JavaScript 1.1 Workarounds

Workarounds Available:
 
Applet
applets
Area
Array
Boolean
border
closed
complete
current
domain
embeds
FileUpload
history
images
join
MAX_VALUE
MimeType
MIN_VALUE
NaN
NEGATIVE_INFINITY
Number
onAbort
onError
onMouseOut
onMouseOver
onReset
opener
Plugin
plugins
POSITIVE_INFINITY
prototype
replace
reverse
scroll
sort
split
toString
valueOf
void

No Workarounds Available:
 
constructor
description
enabledPlugin
fileName
hspace
Image
javaEnabled
lowsrc
mimeTypes
next
Option
previous
refresh
reload
reset
src
suffixes
taint
untaint
vspace
width

Area

Areas Affected:
Javascript 1.1 Object



Background Information:
Object. Defines an area of an image as an image map. When the user clicks the area, the area's hypertext reference is loaded into its target window. Area objects are a type of Link object.


Workaround:
 
Javascript 1.0 Since there is no NAME attribute for the Area objects, one must use a numeric index, such as document.links[0], to reference one of the these objects.
JScript 3.0 No Workaround exists
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

Array

Areas Affected:
JavaScript 1.1 Object



Background:
Provides support for creation of arrays of any data type.As arrays are zero-based, created elements will have indexes from zero to size -1.
element0,...,elementn The elements to place in the array. This creates an array with n + 1 elements, and a length of n.

Example:

var my_array = new Array();
for (i = 0; i < 10; i++)
    {
    my_array[i] = i;
    }
x = my_array[4];



Workaround:
 
Javascript 1.0 No Workaround exists
JScript 3.0 Object is part of the JScript 3.0 API
JScript 2.0 Object is part of the JScript 2.0 API
JScript 1.0 No Workaround exists

Table of Contents
 

Boolean

Areas Affected:
JScript 2.0 Object



Background Information:
Creates a new Boolean value.
The optional boolvalue argument is the initital Boolean value for the new object. If this value is omitted, or is false, 0, null, NaN, or an empty string, the initial value of the Boolean object is false. Otherwise, the initial value is true. The Boolean object is a wrapper for the Boolean data type. JScript implicitly uses the Boolean object whenever a Boolean data type is converted to a Boolean object. You rarely call the Boolean object explicitly.



Workaround:
 
Javascript 1.0 In JavaScript 1.1, Boolean objects are created by the Boolean constructor, for example 
mode = new Boolean( true ); 
In JavaScript 1.0, all Booleans had to be created by assignments, for example, 
mode = true;
JScript 3.0 Object is part of the JScript 3.0 API
JScript 2.0 Object is part of the JScript 2.0 API
JScript 1.0 No Workaround exists

Table of Contents

FileUpload

Areas Affected:
Javascript 1.1 Function



Background Information:
This is a class that represents a file upload box in an HTML form. When a page loads, all file Upload boxes will have a FileUpload object created for it which you can reference.



Workaround:
 
JScript 3.0 Workarounds can be found within the Input Objects in DOM 1.0
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents

Image

Areas Affected:
Javascript 1.1 Object



Background Information:
The primary use for an Image object created with the Image() constructor is to load an image from the network (and decode it) before it is actually needed for display. Then when you need to display the image within an existing image cell, you can set the src property of the displayed image to the same value as that used for the prefetched image, as follows.

myImage = new Image()
myImage.src = "seaotter.gif"...
document.images[0].src = myImage.src

The resulting image will be obtained from cache, rather than loaded over the network, assuming that sufficient time has elapsed to load and decode the entire image. You can use this technique to create smooth animations, or you could display one of several images based on form input.



Workaround:
 
Javascript 1.0 No Workaround exists
JScript 3.0 No Workaround exists
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents

MimeType

Areas Affected:
Javascript 1.1 Object



Background Information:
Provides information about a MIME data type that the browser supports. Scripts can reference navigator.mimeTypes array by either a numeric index or by a string index specifying the type of the desired object.


Workaround:
 
JScript 3.0 see Navigator.mimeTypes collections within the toolbox reference window. 

The following code displays the type, description, suffixes, and enabledPlugin properties for each MimeType object on a client: 

document.writeln("<TABLE BORDER=1><TR VALIGN=TOP>", 
                       "<TH ALIGN=left>", 
                       "<TH ALIGN=left>type", 
                       "<TH ALIGN=left>description", 
                       "<TH ALIGN=left>suffixes", 
                       "<TH ALIGN=left>enabledPlugin.name</TR>") 
for (i=0; i < navigator.mimeTypes.length; i++) { 
   document.writeln("<TR VALIGN=TOP><TD>", 
    i, 
    "<TD>", 
    navigator.mimeTypes[i].type, 
    "<TD>", 
    navigator.mimeTypes[i].description, 
    "<TD>", 
    navigator.mimeTypes[i].suffixes) 
    if (navigator.mimeTypes[i].enabledPlugin==null) { 
          document.writeln("<TD>None", 
          "</TR>") 
    } else { 
        document.writeln( 
            "<TD>", 
            navigator.mimeTypes[i].enabledPlugin.name, 
            "</TR>") 
   } 

document.writeln("</TABLE>")

JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists
VBScript 3.0 No Workaround exists

Table of Contents

Number

Areas Affected:
JScript 3.0 Object



Background Information:
Number object is a new type in JavaScript 1.1 that represents a numerical number.



Workaround:
 
Javascript 1.0 In JavaScript 1.1, Number objects are created by the Number constructor, for example 
mode = new Number ( 4 ); 

In JavaScript 1.0, all Numbers had to be created by assignments, for example, 
mode = 4;

JScript 3.0 Object part of the JScript 3.0 API
JScript 2.0 Object part of the JScript 2.0 API
JScript 1.0 No Workaround exists

Table of Contents

Option

Areas Affected:
Javascript 1.1 Object



Background Information:
Creates an option for a select box in an HTML form. When Navigator loads a web page, it creates Option objects to corresponding to all <OPTION> tags in the document. These tags are always enclosed by the <SELECT> and </SELECT> tags. You can use the new Option() constructor to create an Option object and then add it to an existing Select object.


Workaround:
 
Javascript 1.0 No Workaround exists
JScript 3.0 No Workaround exists
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 
Plugin, applets, domain, embeds, images, closed, opener, border, history, plugins, scroll, Applet, complete

Areas 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

constructor

Areas Affected:
JScript 2.0 Function - All Objects



Background Information:
Specifies the function that creates an object.

Example:

y = new MyFunc();
if (y.constructor == MyFunc)
  // do something



Workaround:
 
Javascript 1.0 No Workaround exists
JScript 3.0 No Workaround exists
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

current

Areas Affected:
Javascript 1.1 Functions



Background Information:
This is a property of the history object. The history object is an array that holds a list of all URLs that the browser has navigated to. current returns a string of the URL linked/attached to the page currently loaded in the browser.

In JavaScript 1.1, current can only be used when data tainting is enabled
in JavaScript 1.2, current can only be used in a signed script with the 'UniversalBrowserRead' privilege enabled.



Workaround:
 
JScript 3.0 See JScript 1.0 Workaround
JScript 2.0 See JScript 1.0 Workaround
JScript 1.0 document.url()
JavaScript 1.0 No Workaround exists

Table of Contents
 

description

Areas Affected:
Javascript 1.1 Properties



Background Information:
For MimeType objects, this property provides a description of the data associated with the MIME type. For Plugin objects, this property provides a description of the plug-in; its value is set by the plug-in.


Workaround:
 
Javascript 1.0 No Workaround exists
JScript 3.0 No Workaround exists
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

enabledPlugin

Areas Affected:
Javascript 1.1 Properties



Background Information:
This is a property of the MimeType external object. If Plug-ins have been enabled within the browser, this property will return a handle to the plugin object.


Workaround:
 
Javascript 1.0 No Workaround exists
JScript 3.0 No Workaround exists
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

fileName

Areas Affected:
Javascript 1.2 new Functions



Background Information:
The filename property is the plug-in program's file name and is supplied by the plug-in itself. This name may vary from platform to platform.



Workaround:
 
Javascript 1.0 No Workaround exists
JScript 3.0 No Workaround exists
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

height

Areas Affected:
Javascript 1.1 Function



Background Information:
Display screen height, in pixels.



Workaround:
 
Javascript 1.0 No Workaround exists
JScript 3.0 No Workaround exists
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

hspace

Areas Affected:
Javascript 1.1 Property



Background Information:
Returns the distance, in pixels, between the left and right edges of an image and the surrounding text.


Workaround:
 
Javascript 1.0 No Workaround exists
JScript 3.0 No Workaround exists
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

lowsrc

Areas Affected:
Javascript 1.1 Image Property



Background Information:
A string specifying the URL of a low resolution version of an image to be displayed in a document.
The lowsrc property initially reflects the LOWSRC attribute of the <IMG> tag. Navigator loads the smaller image specified by lowsrc and then replaces it with the larger image specified by the src property. You can change the lowsrc property at any time.


Workaround:
 
Javascript 1.0 No Workaround exists
JScript 3.0 No Workaround exists
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

MAX_VALUE

Areas Affected:
JScript 3.0 Constant



Background Information:
The largest number representable in JScript. Equal to approximately 1.79E+308.



Workaround:
 
Javascript 1.0 Number.MAX_VALUE has a value of approximately 1.79E+308. 
In the beginning of the document, define constants MAX_VALUE and MIN_VALUE to values given above.
JScript 3.0 Constant part of the JScript 3.0 API
JScript 2.0 Constnat part of the JScript 2.0 API
JScript 1.0 Number.MAX_VALUE has a value of approximately 1.79E+308. 
In the beginning of the document, define constants MAX_VALUE and MIN_VALUE to values given above.

Table of Contents
 

MIN_VALUE

Areas Affected:
JScript 3.0 Constant



Background Information:
The number closest to zero representable in JScript. Equal to approximately 2.22E-308.



Workaround:
 
Javascript 1.0 Number.MIN_VALUE has a value of approximately 2.22E-308. 
In the beginning of the document, define constants MAX_VALUE and MIN_VALUE to values given above.
JScript 3.0 Constant part of the JScript 3.0 API
JScript 2.0 Constnat part of the JScript 2.0 API
JScript 1.0 Number.MIN_VALUE has a value of approximately 2.22E-308. 
In the beginning of the document, define constants MAX_VALUE and MIN_VALUE to values given above.

Table of Contents
 

NaN

Areas Affected:
JScript 3.0 Constant



Background Information:
A special value that indicates an arithmetic expression returned a value that was not a number.


Workaround:
 
Javascript 1.0 No Workaround exists
JScript 3.0 Part of the Global Object Model
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

NEGATIVE_INFINITY

Areas Affected:
JScript 3.0 Constant



Background Information:
A value more negative than the largest negative number (-Number.MAX_VALUE) representable in JScript.



Workaround:
 
Javascript 1.0 No Workaround exists
JScript 3.0 Constant part of the JScript 3.0 API
JScript 2.0 Constant part of the JScript 2.0 API
JScript 1.0 No Workaround exists

Table of Contents
 

next

Areas Affected:
Javascript 1.1 Tainted Signed Scripts



Background Information:
This is relative to the history object only. A string specifying the complete URL of the next history entry. This property is tainted by default. It has no value of data tainting is disabled. For information on data tainting, see "JavaScript Security". Navigator 4.0: Getting the value of this property requires the UniversalBrowserRead privilege. It has no value if you do not have this privilege.



Workaround:
 
Javascript 1.0 No Workaround exists
JScript 3.0 No Workaround exists
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents

POSITIVE_INFINITY

Areas Affected:
JScript 3.0 Constant



Background Information:
A value larger than the largest number (Number.MAX_VALUE) representable in JScript.


Workaround:
 
Javascript 1.0 No Workaround exists
JScript 3.0 Constant part of the JScript 3.0 API
JScript 2.0 Constant part of the JScript 2.0 API
JScript 1.0 No Workaround exists

Table of Contents
 

previous

Areas Affected:
Javascript 1.1 Tainted



Background Information:
Returns the URL of the previous document that was displayed within the browser window or the page that would be displayed if the user click the back button. This deals with the history object only.


Workaround:
 
Javascript 1.0 No Workaround exists
JScript 3.0 No Workaround exists
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

prototype

Areas Affected:
JavaScript 1.1



Background Information:
Use the prototype property to provide a base set of functionality to a class of objects. New instances of an object "inherit" the behavior of the prototype assigned to that object. For example, say you want to add a method to the Array object that returns the value of the largest element of the array. To do this, declare the function, add it to Array.prototype, and then use it.

Example:
function array_max( )
{
  var i, max = this[0];
  for (i = 1; i < this.length; i++)
  {
     if (max < this[i])
      max = this[i];
  }
  return max;
}
Array.prototype.max = array_max;
var x = new Array(1, 2, 3, 4, 5, 6);
var y = x.max( );

After this code is executed, y contains the largest value in the array x, or 6.



Workaround:
 
Javascript 1.0 No Workaround exists
JScript 3.0 Part of the JScript 3.0 API
JScript 2.0 Part of the JScript 2.0 API
JScript 1.0 No Workaround exists

Table of Contents

suffixes

Areas Affected:
Javascript 1.2 new Functions



Background Information:
Returns a string listing file name suffixes (also called extensions) that Navigaotr recognizes as data for MIME type.


Workaround:
 
Javascript 1.0 No Workaround exists
JScript 3.0 No Workaround exists
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

vspace

Areas Affected:
Javascript 1.1 



Background Information:
Returns the distance, in pixels, between the top and bottom edges of an image and the surrounding text.


Workaround:
 
Javascript 1.0 No Workaround exists
JScript 3.0 No Workaround exists
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents

width

Areas Affected:
Javascript 1.2 new Functions



Background Information:
Display screen width, in pixels.



Workaround:
 
Javascript 1.0 No Workaround exists
JScript 3.0 No Workaround exists
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents

src

Areas Affected:
Javascript 1.1 Image Object



Background Information:
The src property initially reflects the SRC attribute of the <IMG> tag. Setting the src property begins loading the new URL into the image area (and aborts the transfer of any image data that is already loading into the same area). Therefore, if you plan to alter the lowsrc property, you should do so before setting the src property. If the URL in the src property references an image that is not the same size as the image cell it is loaded into, the source image is scaled to fit.

When you change the src property of a displayed image, the new image you specify is displayed in the area defined for the original image. For example, suppose an Image object originally displays the file beluga.gif:



Workaround:
 
Javascript 1.0 No Workaround exists
JScript 3.0 No Workaround exists
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

mimeTypes

Areas Affected:
Javascript 1.1 Netscape Navigator Object



Background Information:
Provides information about MIME data types that the browser supports. Each element of this array is a MimeType object that describes one MIME data type that the browser supports.


Workaround:
 
Javascript 1.0 No Workaround exists
JScript 3.0 No Workaround exists
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents

javaEnabled

Areas Affected:
Javascript 1.1



Background Information:
javaEnabled returns true if Java is enabled, false otherwise. The user can enable or disable Java by choosing Network Preferences from the Navigator's Options menu.



Workaround:
 
Javascript 1.0 No Workaround exists
JScript 3.0 No Workaround exists
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

join

Areas Affected:
Javascript 1.1 Method - Array Object



Background Information:
The join function is a method of the array object that will return a string formed by combining the elements of an array. This method converts each element of an array to a string, and then it returns a string consisting of all these individual strings joined together.


Workaround:
 
Javascript 1.0 No Workaround exists
JScript 3.0 Array Object is part of the JScript 3.0 API
JScript 2.0 Array Object is part of the JScript 2.0 API
JScript 1.0 No Workaround exists

Table of Contents
 

refresh

Areas Affected:
Javascript 1.1



Background Information:
When the user installs a plug-in, the plug-in cannot be used until the browser has been closed and reopened, or until the refresh() method is used. This method will refresh the plugins array, making the newly installed plug-in available. If the reload argument is true, Navigator also reloads all open documents that contain <EMBED> tags.


Workaround:
 
Javascript 1.0 No Workaround exists
JScript 3.0 No Workaround exists
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

reload

Areas Affected:
Javascript 1.1 Function



Background Information:
This method reloads the document specified by location.href. The reload() method carries out the same reload operation that would be carried out if the user clicked the browser's Reload button. This is controlled, to some degree , by the browser's Preferences settings for its cache.


Workaround:
 
Javascript 1.0 No Workaround exists
JScript 3.0 No Workaround exists
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents
 

replace

Areas Affected:
Javascript 1.2 String Functions 



Background Information:
This method returns a string containing a copy of the original string in which one or more substring sthat match the regular expression have been replaced with the specified new value.


Workaround:
 
Javascript 1.0 No Workaround exists
JScript 3.0 String object is part of the JScript 3.0 API
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents

reset

Areas Affected:
Javascript 1.2 new Functions



Background Information:
The reset() method simulates a click on a Reset button in a form. That is, it resets all the values in the form to their defaults. reset9) can be used even if no Reset button is present in the form.


Workaround:
 
Javascript 1.0 No Workaround exists
JScript 3.0 No Workaround exists
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents

reverse

Areas Affected:
JScript 3.0 Function - Array Object



Background Information:
Reverses the elements of an Array object.


Workaround:
 
Javascript 1.0 No Workaround exists
JScript 3.0 Array Object is part of the JScript 3.0 API
JScript 2.0 Array object is part of the JScript 2.0 API
JScript 1.0 No Workaround exists

Table of Contents
 

sort

Areas Affected:
JavaScript 1.1 Method - Array Object



Background Information:
The sort method sorts the Array object in place; no new Array object is created during execution.
If you supply a function in the sortfunction argument, it must return one of the following values:

A negative value if the first argument passed is less than the second argument.
Zero if the two arguments are equivalent.
A positive value if the first argument is greater than the second argument.



Workaround:
 
Javascript 1.0 No Workaround exists
JScript 3.0 Array Object is part of the JScript 3.0 API
JScript 2.0 Array Object is part of the JScript 2.0 API
JScript 1.0 No Workaround exists

Table of Contents
 

split

Areas Affected:
Javascript 1.1



Background Information:
Splits a String object into an array of strings by separating the string into substrings. The split method returns the new array.
When found, separator is removed from the string and the substrings are returned in an array. If separator is omitted, the array contains one element consisting of the entire string.

In Navigator 4.0, Split has the following additions:
It can take a regular expression argument, as well as a fixed string, by which to split the object string. If separator is a regular expression, any included parenthesis cause submatches to be included in the returned array. It can take a limit count so that it won't include trailing empty elements in the resulting array.

Examples

Example 1. The following example defines a function that splits a string into an array of strings using the specified separator. After splitting the string, the function displays messages indicating the original string (before the split), the separator used, the number of elements in the array, and the individual array elements.

function splitString (stringToSplit,separator) {
arrayOfStrings = stringToSplit.split(separator)
document.write ('<P>The original string is: "' + stringToSplit + '"')
document.write ('<BR>The separator is: "' + separator + '"')
document.write ("<BR>The array has " + arrayOfStrings.length + " elements: ")
   for (var i=0; i < arrayOfStrings.length; i++) {
    document.write (arrayOfStrings[i] + " / ")
  }
}
var tempestString="Oh brave new world that has such people in it."var
var space=" "
var comma=","
splitString(tempestString,space)
This example produces the following output:

The original string is: "Oh brave new world that has such people in it."The separator is: " "The array has 10 elements: Oh / brave / new / world / that / has / such / people / in / it. / "
 
 
Javascript 1.0 No Workaround exists
JScript 3.0 Array Object is part of the JScript 3.0 API
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents

valueOf

Areas Affected:
JScript 3.0 Object Function



Background Information:
Returns the primitive value of the specified object.
The valueOf method is defined differently for each intrinsic JScript object.

"Array" The elements of the array are converted into strings, and the strings are concatenated together, separated by commas. This behaves the same as the Array.toString and Array.join methods.
"Boolean" The Boolean value.
"Date" The stored time value in milliseconds since midnight, January 1, 1970 UTC.
"Function" The function itself.
"Number" The numeric value.
"Object" The object itself. This is the default.
"String" The string value.



Workaround:
 
Javascript 1.0 No Workaround exists
JScript 3.0 Object method is part of the JScript 3.0 API
JScript 2.0 Object method is part of the JScript 2.0 API
JScript 1.0 No Workaround exists

Table of Contents
 

onAbort, onError, onMouseOut, onReset, onMouseOver

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

taint

Areas Affected:
Javascript 1.1 



Background Information:
Starting with Navigator 2.02, the browser restricted scripts from passing private information - such as session histories and directory structures - to different servers. In Navigator 3, a feature called data tainting was introduced which when enbabled, if a script attempts to transfer tainted data, Navigator opens a dialog box notifying the user of the transfer, and allowing the user to cancel it if desired. Some objects and properties are tainted by default, but you can add tainting to data or scripts that are normally untainted using taint().

Example:
To taint the src property of a layer object, which is not normally tainted, use a statement such as:

layer1.src = taint(layer1.src)



Workaround:
 
Javascript 1.0 No Workaround exists
JScript 3.0 No Workaround exists
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents

untaint

Areas Affected:
Javascript 1.1 



Background Information:
Starting with Navigator 2.02, the browser restricted scripts from passing private information - such as session histories and directory structures - to different servers. In Navigator 3, a feature called data tainting was introduced which when enbabled, if a script attempts to transfer tainted data, Navigator opens a dialog box notifying the user of the transfer, and allowing the user to cancel it if desired. Some objects and properties are tainted by default. untaint() removes tainting from them, as well as from objects that were tainted using the taint() function.



Workaround:
 
Javascript 1.0 No Workaround exists
JScript 3.0 No Workaround exists
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents

void

Areas Affected:
JavaScript 1.1 Functions



Background Information:
The void operator evaluates its expression, and returns undefined. It is most useful in situations where you want an expression evaluated but do not want the results visible to the remainder of the script.


Workaround:
 
Javascript 1.0 No Workaround exists
JScript 3.0 Part of the JScript 3.0 API
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents

toString

Areas Affected:
JavaScript 1.1 Functions



Background Information:
Returns a string representation of an object.

The toString method is a member of all built-in JScript objects. How it behaves depends on the object type:

"Array Elements" of an Array are converted to strings. The resulting strings are concatenated, separated by commas.
"Boolean" If the Boolean value is true, returns "true". Otherwise, returns "false"
"Function" Returns a string returned of the following form, where functionname is the name of the function whose toString method was called:
function functionname( ) { [native code] }
"Number" Returns the textual representation of the number.
"String" Returns the value of the String object.
"Default Returns" "[object objectname]", where objectname is the name of the object type.



Workaround:
 
Javascript 1.0 No Workaround exists
JScript 3.0 Part of the JScript 3.0 API
JScript 2.0 No Workaround exists
JScript 1.0 No Workaround exists

Table of Contents