Team LiB
Previous Section Next Section

Index

S

Safari, 247
same-origin check, 680–681
same-origin policy, 680–683
embedded documents and, 681
exceptions to, 682
external scripts and, 681–682
overview of, 683
problems with, 682–683
same-origin check, 680–681
samp object, document objects, 862
<samp>, 862
saveHistory behavior, DHTML, 532
schemas, valid XML, 607–608
scope, event model, 311–312
scope, variable, 70–73
scr attribute, 15–16
Screen object, 544–548
screen object, browser objects, 862–863
script object, HTMLScriptElement, 862–863
<script>, 7–11
code hiding and, 720–723
correspondence to script object, 863
dynamic content and, 589
including JavaScript within HTML or XHTML, 7–8
JavaScript version detection, 541–542
locating in <head> tag, 8–9
script hiding, 9–11
use with browsers, 4
scripting languages, 23. See also programming languages
scripts
cross-site scripting, 592
defining all functions for, 128
error categories, 695
execution order, 25
hiding, 9–11
Internet Explorer XML data islands, 630–632
JScript script control, 671
JScript script host, 671
manipulating filters and transitions, 654–655
server-side, 582
signed for security, 683–684
scrollBy( ) method, Window object, 364
scrolling windows, Window object, 364–366
scrollTo( ) method, Window object, 364
search( ) method, String object, 185, 212
security, 679–694
ActiveXObject, 655–656
browser issues, 690–692
cookies, 527
cross-site scripting, 692–694
JavaScript models, 679–680
JavaScript-driven applets, 563
Mozilla policies, 685–686
same-origin policy, 680–683
signed scripts, 683–684
templates, 687–688
XMLHTTP, 600
security zones, IE, 686–690
ActiveX controls, 689–690
categorizing sites into, 687
list of, 686
properties, 688–689
security templates for, 687–688
select menus, 437–442
select object, HTMLSelectElement, 864–865
<select>, 437–439, 506, 864
selection object, proprietary browser objects, 865–866
self-assignment operators, arithmetic, 739
self-assignment operators, bitwise, 740
semantic errors, 697–698
semicolons
placement in for loops, 105
statements and, 27–28
termination with, 76–77
sendURL( ), 585
servers, 581. See also remote JavaScript
server-side computation, 592–594
server-side scripts
cross-site scripting and, 592
implementing RPC with, 590
overview of, 582
spelling correction feature and, 592–594
session cookies, 522
set methods, Date object, 176
setInterval( ) method
DHTML transitions, 498
static menus and, 518
Window object, 369
setTimeout( ) method, Window object, 368, 587
shift( ) method, arrays, 166
shorthand assignment, 84–85
show( ) method, pop-up windows, 670
showModalDialog( ) method, 381
signed scripts, 683–684
signing tools, 684
single-line comments, 43
site navigation, 505. See also cookies; pull-down menus
slice( ) method, Array object, 169
slice( ) method, String object, 185
slide-in menus, DHTML, 515–518
small object, HTMLElement, 865–866
<small>, 866
sort( ) method, Array object, 170–171
span object, HTMLElement, 866–867
<span>, 866
special characters, 54, 194–195
special values, 51–52
spelling correction feature, 592–594
splice( ) method, Array object, 169
split( ) method, String object, 186, 212
square brackets ([ ]), 93, 198
src attribute, <embed>, 564
stack traces, 704–706
stacks, Array object as, 165–166
stand-alone functions, 130
standards
DOM, 134, 236, 489
ECMAScript, 20–21
support in Mozilla, 674–675
W3C, 21, 134
state management
with cookies, 527
with frames, 379–381
IE extensions, 531–532
stateless protocols, 522
statements, 27–28
blocks, 77–78
continue, 105–108
definition of, 24
do-while loops, 103–104
else, 97–98
flow control, 36–37
for...in, 109–110
if, 97
import/export, 109
loops, 37–39
for loops, 104–105
overview of, 27
returns and, 27–28
semicolons and, 27–28
short-circuiting evaluation of logical expressions, 99
switch, 98–101
termination, 76–77
throw, 109
try...catch, 109
while loops, 102–103
whitespace, 76
with, 108–109
static menus, DHTML, 518–520
static properties
Event object, 320
objects, 155–156
RegExp object, 209–211, 751
static variables, 124–125
status bar properties, Window object, 367–368
status messages, forms, 456
status property, Window object, 367, 457
stopPropagation( ) method, DOM2, 340
strike object, HTMLElement, 867
<strike>, 867
string data type, 53–57
character representation, 54–55
converting, 66, 734
defined, 29
HTML and, 56–57
overview of, 53–54
quote notation of, 55–56
special characters, 54
String object, 183–188
comparing strings, 88–89
concatenation of strings, 80–81
escape codes, 733
examining strings, 184–185
functions made accessible by, 135
manipulating strings, 186
marking up strings as HTML, 186–187
methods, 54, 187–188, 868–869
overview of, 183–184
properties, 867
regular expression methods, 211–214
String( ) constructor, 183–184
strong object, HTMLElement, 870
<strong>, 870
strongly typed languages, 48
style attribute, 505
style classes, DHTML, 493–494
Style object
DHTML, 489–493
methods, 885
position-related properties, 477
properties, 492–493, 870–884
style object, document objects, 885
style sheets, 539
<style>, 285, 532, 885
styles, CSS. See CSS (Cascading Style Sheets)
styles, DHTML
classes, 493–494
computed styles, 494–496
objects, 489–493
styleSheet object, document objects, 886–887
styleSheets[ ] collection, 285
sub object, HTMLElement, 887
<sub>, 887
subexpressions, RegExp, 203–204
submit object, HTMLInputElement, 888
submit( ) method, Form object, 418–419
substring( ) method, 185
subtraction (-) operator, 79
subtrees, DOM, 254
sup object, HTMLElement, 889
<sup>, 889
SVG, 617
switch statements, 98–101
as alternative to if/else statements, 98
case and, 36–37, 100
forms of, 746
issues with, 101–102
syntax, 99–100
symptoms, JavaScript errors, 701–702
syntax errors, 695–696, 698, 700
syntax reference, 729–751
arithmetic operators, 739–740
bitwise operators, 740
block statements, 744–745
built-in objects, 736
comma operator, 742
composite types, 735
conditional operators, 740–741
conditional statements, 746
data types, 732
exceptions, 748
flow control, 744
functions, 745
instance properties, 735
labels, 747
languages, 729–731
literals, 737–738
logical operators, 740
loops, 746–747
object creation, 735
operator precedence and associativity, 743–744
operators, 739
primitive types, 732–733
regular expressions, 748–751
relational, 742–743
with statements, 745
this statement, 736
type conversion, 733–735
type operators, 741

Team LiB
Previous Section Next Section