Table of Contents | Previous


Index

Symbols

- (bitwise NOT) operator 52
- (unary negation) operator 51
-- (decrement) operator 51
! (logical NOT) operator 54
!= (not equal) operator 50
!== (strict not equal) operator 50
% (modulus) operator 51
%= operator 49
&& (logical AND) operator 54
& (bitwise AND) operator 52
&= operator 49
*/ comment 90
*= operator 49
+ (string concatenation) operator 55
++ (increment) operator 51
+= (string concatenation) operator 55
+= operator 49
/* comment 90
// comment 90, 150
/= operator 49
< (less than) operator 50
<< (left shift) operator 52, 53
<<= operator 49
<= (less than or equal) operator 50
== (equal) operator 50
=== (strict equal) operator 50
-= operator 49
> (greater than) operator 50
>= (greater than or equal) operator 50
>> (sign-propagating right shift) operator 52, 53
>>= operator 49
>>> (zero-fill right shift) operator 52, 53
>>>= operator 49
?: (conditional) operator 56
^ (bitwise XOR) operator 52
^= operator 49
| (bitwise OR) operator 52
|= operator 49
|| (logical OR) operator 54
(comma) operator 56

A

accumulator
See tainting
A HTML tag 199
alert method 161, 177
AND (&&) logical operator 54
AND (&) bitwise operator 52
applets
controlling with LiveConnect 252
example of 253, 254
flashing text example 254
Hello World example 253, 262
referencing 252
ARCHIVE attribute 222
arguments array 94
arithmetic operators 51
% (modulus) 51
-- (decrement) 51
- (unary negation) 51
++ (increment) 51
Array object
creating 108
overview 107
arrays
See also the individual arrays
associative 100
defined 107
deleting elements 57
indexing 108, 183
Java 251
list of predefined 182
literals 37
populating 108
predefined 182
referring to elements 108, 183
regular expressions and 110
two-dimensional 110
undefined elements 35
ASCII
glossary entry 293
Unicode and 43
assignment operators 49
%= 49
&= 49
*= 49
+= 49
/= 49
<<= 49
-= 49
>>= 49
>>>= 49
^= 49
|= 49
defined 47

B

bitwise operators 51
& (AND) 52
- (NOT) 52
<< (left shift) 52, 53
>> (sign-propagating right shift) 52, 53
>>> (zero-fill right shift) 52, 53
^ (XOR) 52
| (OR) 52
logical 52
shift 53
BLOb, glossary entry 293
blur method 178
Boolean literals 38
Boolean object 111
conditional tests and 38, 80
Boolean type conversions (LiveConnect) 265
booleanValue method 272
break statement 86
browser, hiding scripts from 150
buttons, submit 170

C

captureEvents method 163
capturing events 163
case sensitivity 35, 147
object names 100
property names 100
regular expressions and 74
case statement
See switch statement
CGI, glossary entry 293
CGI programs
and image maps 203
submitting forms to 169
validating form input for 167
char arguments 252
class-based languages, defined 122
classes
defining 122
Java 251
LiveConnect 256, 257
client
glossary entry 293
client-side JavaScript 20, 22
glossary entry 293
illustrated 22
objects 171-187
overview 22
close method 177
window object 191
codebase principals 217
comma () operator 56
commas, in cookies 205
comments 150
comments, types of 90
comment statement 90
comparison operators 50
!= (not equal) 50
!== (strict not equal) 50
< (less than) 50
<= (less than or equal) 50
== (equal) 50
=== (strict equal) 50
> (greater than) 50
>= (greater than or equal) 50
compute function 161
conditional (?:) operator 56
conditional expressions 56
conditional statements 80-82
if...else 80
switch 81
conditional tests, Boolean objects and 38, 80
confirm method 161, 177
console, JavaScript 289
constructor functions 102
global information in 141
initializing property values with 133
containership
specifying default object 89
with statement and 89
continue statement 87
cookies
defined 205
example of use 207
glossary entry 293
with JavaScript 206
limitations for 206
using 205
CORBA, glossary entry 293
core JavaScript 22
glossary entry 293

D

data tainting
See tainting
data types
Boolean conversions 265
converting 34
converting with LiveConnect 263-272
and Date object 34
JavaArray conversions 268
JavaClass conversions 270
JavaObject conversions 268
in JavaScript 26, 33
JavaScript to Java conversion 264
Java to JavaScript conversion 272
null conversions 268
number conversions 264
other conversions 271
string conversions 266
undefined conversions 267
Date object
creating 111
overview 111
dates
cookie expiration 205
Debugger 27
decrement (--) operator 51
default objects, specifying 89
defaultStatus property 204
delete operator 57, 107
deleting
array elements 57
objects 57, 107
properties 57
deprecate, glossary entry 293
dialog boxes
Alert 177
Confirm 161, 177
Prompt 177
directories
conventions used 18
do...while statement 84
document conventions 18
document object 173
See also documents
described 178
example of properties 174-175
documents
See also windows
document object 178

E

ECMA, glossary entry 293
ECMAScript, glossary entry 294
ECMA specification 28
JavaScript documentation and 30
JavaScript versions and 29
terminology 30
elements array 179
elements property
See elements array
else statement
See if...else statement
end_time method (LiveAudio) 274
entities 153
error messages
displaying to users 289
escape function 98, 205, 206
escaping characters 42
Unicode 45
eval function 95, 161
evaluating expressions 290
event handlers
See also the individual event handlers
defining 157, 159
defining functions for 160
example of use 160-161
list of 158
quotation marks for 154
referring to windows 197
resetting 162
syntax for 159
validating form input with 167
event object 163
events 157-170
capturing 163
defined 157
list of 158
exceptions
handling in Java 259
exec method 70
expressions
See also regular expressions
conditional 56
evaluating in JavaScript console 290
in HTML attributes 153
overview 47
that return no value 60
types of 48
external functions, glossary entry 294

F

fade_from_to method (LiveAudio) 274
fade_to method (LiveAudio) 274
flashing text applet example 254
floating-point literals 39
floatValue method 272
focus method 178
for...in statement 88, 100
for loops
continuation of 87
sequence of execution 83
termination of 86
form elements
updating 187
updating dynamically 177
FORM HTML tag 173, 199
Form object
See also forms
described 179
elements array 179
forms
elements array 179
Form object 179
forms array 179
referring to windows in submit 199
validating input 167
forms array 179
forms property
See forms array
for statement 83
FRAME HTML tag 177
Frame object
See also frames
described 177-178
frames
closing 191
creating 192
defined 191
example of creation 195-196
figure of 192
Frame object 177-178
frames array 193, 194
hierarchy of 193
navigating 195
referring to 195, 197-199
updating 194
frames array 193, 194
FRAMESET HTML tag 192
frames property
See frames array
function keyword 91
Function object 114
functions 91-98
arguments array 94
calling 93
defining 91
examples of 168
Function object 114
importing and exporting in signed scripts 231, 234
predefined 95-98
recursive 93
using built-in 95-98
using validation 169-170

G

getDay method 112
getHours method 114
getMember method 258
getMinutes method 114
getSeconds method 114
getTime method 113
GetVolume method (LiveAudio) 274
global object 30
go method 180

H

handleEvent method 163
hash errors and signed scripts 239
Hello World applet example 253, 262
history list 180
history object 173
described 180
HREF attribute 203
HTML
embedding JavaScript in 147-155
glossary entry 294
layout 176-177
HTML tags
A 199
FORM 173, 199
FRAME 177
FRAMESET 192
IMG 203
MAP 202
NOSCRIPT 154
PRE 185
SCRIPT 148, 214, 222, 223
TITLE 175
HTTP
glossary entry 294
hypertext
See links

I

ID attribute 223
identity taint code 242
if...else statement 80
image maps
client-side 202
server-side 203
IMG HTML tag 203
increment (++) operator 51
inheritance
class-based languages and 123
multiple 143
property 138
initializers for objects 101
integers, in JavaScript 39
international characters in signed scripts 231
internationalization 43
IP address, glossary entry 294
isFinite function 95
ISMAP attribute 203
isNaN function 96
IsPaused method (LiveAudio) 274
IsPlaying method (LiveAudio) 274
IsReady method (LiveAudio) 274

J

JAR files 222, 223, 234
Java
See also LiveConnect
accessing JavaScript 256
accessing with LiveConnect 249
applets and same origin policy 215
arrays in JavaScript 251
calling from JavaScript 249
classes 251
communication with JavaScript 247-272
compared to JavaScript 26, 121-144
getting JavaScript window handle 260
to JavaScript communication 256
JavaScript exceptions and 259
methods requiring char arguments 252
objects, naming in JavaScript 250
object wrappers 249
packages 251
JavaArray object 249, 251
JavaArray type conversions 268
JavaClass object 249, 251
JavaClass type conversions (LiveConnect) 270
JavaObject object 249, 250
JavaObject type conversions 268
java package 250
JavaPackage object 249, 251
JavaScript
accessing from Java 256
background for using 15
case sensitivity 147
client-side 22
communication with Java 247-272
compared to Java 26, 121-144
components illustrated 21
core 22
differences between server and client 20
displaying errors 289
ECMA specification and 28
embedding in HTML 147-155
entities 153
external file of 152, 214
and HTML layout 176-177
to Java Communication 249
Navigator 22-23
object wrappers 272
overview 19
right-hand evaluation 153
server-side 24-26
special characters 41
specifying version 148
URLs 201
versions and Navigator 16
JavaScript console 289
displaying error messages 291
evaluating expressions 290
glossary entry 294
opening 290
javascript typein 290
JSException class 256, 259
JSObject, accessing JavaScript with 257
JSObject class 256

L

labeled statements
with break 86
with continue 87
label statement 86
language, specifying 148
LANGUAGE attribute 148
layers
same origin policy and 214
signed scripts and 219
unsigned 230
layout, HTML 176-177
left shift (<<) operator 52, 53
length property 118
links
creating 199
image maps 203
referring to windows 199
with no destination 60
literals 37
Array 37
Boolean 38
floating point 39
integers 39
object 40
string 41
LiveAudio 273-278
examples 275
and LiveConnect 273-278
methods 274
LiveConnect 247-272
accessing Java directly 249
accessing JavaScript objects 260
accessing JavaScript properties 260
calling JavaScript methods 261
calling user-defined functions from Java 262
controlling Java applets 252
controlling Java plug-ins 255
converting data types 263-272
getting a window handle 260
glossary entry 294
Hello World example 262
Java to JavaScript communication 256
and LiveAudio 273-278
objects 249
LiveWire applications, validating form input for 167
location object 173
described 180
location property 194
logical operators 54
! (NOT) 54
&& (AND) 54
|| (OR) 54
short-circuit evaluation 55
loops
continuation of 87
for...in 88
termination of 86
loop statements 82-88
break 86
continue 87
do...while 84
for 83
label 86
while 85
lowercase 35, 147

M

mail filters 281-287
creating 282
debugging 286
example of 286
message object reference 284
news filters 284
MAP HTML tag 202
matching patterns
See regular expressions
match method 70
Math object 116
messages
Alert dialog box 177
Confirm dialog box 177
Prompt dialog box 177
status bar 204
METHOD attribute 175
methods
defined 92
defining 105
referring to windows 197
static 295
MIME, glossary entry 294
MIME types
client capability 208
mimeTypes array 209
mimeTypes property
See mimeTypes array
modulus (%) operator 51

N

NAME attribute 175
Navigator
and JavaScript 22, 24
JavaScript versions supported 16
MIME types supported 208
objects, hierarchy of 171
predefined arrays 182
printing output 185
Navigator JavaScript
See client-side JavaScript
navigator object 172
See also Navigator
described 181
Netscape cookie protocol
glossary entry 294
Netscape Messenger 281-287
netscape package 250
Netscape packages
See packages
Netscape Signing Tool 215, 237
new operator 58, 102
NOSCRIPT HTML tag 154
NOT (!) logical operator 54
NOT (-) bitwise operator 52
NS_ENABLE_TAINT environment variable 241
null keyword 33
null value conversions (LiveConnect) 268
Number function 97
Number object 117
numbers
Number object 117
parsing from strings 96
type conversions (LiveConnect) 264

O

object manipulation statements
for...in 88
this keyword 58
with statement 89
object model 121-144
objects 99-119, 171-187
adding properties 103, 104
constructor function for 102
creating 101-103
creating new types 58
deleting 57, 107
establishing default 89
event 163
getting list of properties for 100
hierarchy of 171
indexing properties 104
inheritance 129
initializers for 101
iterating properties 100
JavaScript in Java 257
literals 40
LiveConnect 249
model of 121-144
overview 100
predefined 107
single instances of 101
onChange event handler 167, 169
onClick event handler 161, 167, 169, 208
onMouseOut event handler 204
onMouseOver event handler 204
onSubmit event handler 170
open method 177
window object 190
operators
arithmetic 51
assignment 49
bitwise 51
comparison 50
defined 47
logical 54
order of 61
overview 48
precedence 61
special 56
string 55
OR (|) bitwise operator 52
OR (||) logical operator 54
output
displaying 187
printing 185

P

packages, Java 251
Packages object 250
pages
objects for 172
updating 187
parentheses in regular expressions 69, 73
parent property 197
parseFloat function 96
parseInt function 96
parse method 113
pattern matching
See regular expressions
pause method (LiveAudio) 274
PI property 116
play method (LiveAudio) 274
Plugin class 256
Plugin object
See plug-ins
plug-ins
controlling with LiveConnect 255
determining installed 208
plugins array 209
plugins property
See plugins array
predefined objects 107
PRE HTML tag 185
primitive value, glossary entry 294
printing generated HTML 185
prompt method 177
properties
See also the individual properties
adding 104, 131
class-based languages and 123
creating 131
getting list of for an object 100
indexing 104
inheritance 129, 138
initializing with constructors 133
iterating for an object 100
naming 175
overview 100
referring to 173
referring to windows 197
static 295
prototype-based languages, defined 122
prototypes 129

Q

quotation marks
for string literals 41
using double 154
using single 154

R

reflection 176-177
RegExp object 63-77
regular expressions 63-77
arrays and 110
creating 64
defined 63
examples of 75
global search with 74
ignoring case 74
parentheses in 69, 73
remembering substrings 69, 73
special characters in 65, 77
using 70
writing patterns 64
releaseEvents method 163
replace method 70
return statement 92
right-hand evaluation 153
routeEvent method 163

S

same origin policy 212-215
document.domain 213
Java applets 215
layers 214
named forms 214
properties accessed 213
SCRIPT tags that load documents 214
SCRIPT HTML tag 148
ARCHIVE attribute 222
ID attribute 223
LANGUAGE attribute 148
SRC attribute 152, 214
scripts
example of 151
hiding 150
SCRIPT tag 148, 214, 222
signed 215-239
scroll method 178
search method 70
security 211-243
See also same origin policy, signed scripts, tainting
same origin policy 212-215
signed scripts 215-239
tainting 240-243
self property 197
semicolons
for event handlers 159
in cookies 205
in JavaScript 151
servers
accessing 243
SSL secure 216
server-side JavaScript 20, 24-26
glossary entry 295
illustrated 24, 25
setDay method 112
setInterval method 178
setTime method 113
setTimeout method 178
setvol method (LiveAudio) 274
short-circuit evaluation 55
signed scripts 215-239
after signing 238
codebase principals and 217
events from other locations 230
expanded privileges 224
frames and 230
hash errors 239
hints for using 234
identifying 222
importing and exporting functions 231, 234
international characters in 231
JAR file name 222, 223, 234
Java security classes 224
layers and 219
more information on 216
Netscape Signing Tool 215, 237
principals 215, 218
privileges 215
SSL servers and 216
targets 215, 226
troubleshooting 238
trusted code base 235
unsigned layers 230
using minimal capability 237
windows and 219
sign-propagating right shift (>>) operator 52, 53
space characters, in cookies 205
special characters in regular expressions 65, 77
special operators 56
split method 70
SRC attribute 152, 214
SSL, unsigned scripts and 216
start_at_beginning method (LiveAudio) 274
start_time method (LiveAudio) 274
statements
break 86
conditional 80-82
continue 87
do...while 84
for 83
for...in 88
if...else 80
label 86
loop 82-88
object manipulation 88-89
overview 79-90
switch 81
while 85
static, glossary entry 295
status bar
displaying hints 204
displaying messages 178, 204
status property 178, 204
stop_at_end method (LiveAudio) 274
StopAll method (LiveAudio) 274
stop method (LiveAudio) 274
String function 97
string literals 41
Unicode in 44
String object
overview 118
regular expressions and 70
strings
changing order using regular expressions 75
concatenating 55
operators for 55
regular expressions and 63
searching for patterns 63
type conversions (LiveConnect) 266
subclasses 123
submit method 170
subwindows, updating 187
sun package 250
switch statement 81

T

tainting 240-243
accumulator 243
conditional statements and 243
control flow and 243
enabling 241
individual data elements 242
NS_ENABLE_TAINT 241
overview 240
properties tainted by default 240
taint accumulator 243
taint code 242
untainting data elements 242
TARGET attribute 199
TCB 235
test method 70
this keyword 102, 105, 160, 169
described 58
for object references 106
TITLE HTML tag 175
toGMTString method 205
top property 197
toString method 272
trusted code base (TCB) 235
typeof operator 59

U

unary negation (-) operator 51
undefined property 34
undefined value 35
conversions (LiveConnect) 267
unescape function 98, 205, 207
Unicode 43-46
described 43
escape sequences 45
string literals and 44
Unicode Consortium 46
values for special characters 44
uppercase 35, 147
URLs
conventions used 18
glossary entry 295
javascript: 201

V

variables
declaring 35
in JavaScript 35
naming 35
scope of 36
undefined 35
var statement 35
versions of JavaScript 16
Visual JavaScript 28
void operator 60

W

while loops
continuation of 87
termination of 86
while statement 85
window object 172
See also windows
described 177-178
methods of 177
windows
See also documents
closing 191
giving focus to 200
handles for 260
naming 190, 197
navigating among 200
opening 190
overview 190
referring to 197-199
signed scripts and 219
taint accumulator 243
window object 177-178
with statement 117
described 89
wrappers
for Java objects 249
for JavaScript objects 272
writeln method 185
write method
using 183
WWW, glossary entry 295

X

XOR (^) operator 52

Z

zero-fill right shift (>>>) operator 52, 53

Table of Contents | Previous

Last Updated: 05/27/99 21:21:51

Copyright (c) 1999 Netscape Communications Corporation

Any sample code included above is provided for your use on an "AS IS" basis, under the Netscape License Agreement - Terms of Use