<SELECT><OPTION value=1>text1<OPTION value=2 selected>text2<OPTION value=3>text3</SELECT>
- the SELECT can have an id or name, but not any of the OPTIONs.
But the SELECT does have an array options[].text and a property selectedIndex.
See Thau's JavaScript Tutorial.
sleep function is missing from JavaScript.
- can use setTimeout or setInterval, but these just start a separate function, with no parameters,
and make for clumsy coding (reconstruction of loops and local variables becoming global).
Can pause to let other threads run by e.g.:
window.showModalDialog(
"javascript:document.writeln( \"<"
+"SCRIPT>window.setTimeout( function(){ window.close(); },"
+"123" +");<" +"/SCRIPT>\" )" );
where "123" is the sleep period in msec;
(with a timeout of zero, this takes about 120ms on a 400MHz PC)
or by calling an ActiveX function which does a C++ 'sleep'.
These methods allow the display to be updated, but neither allows processing events such as mouseclicks in the current window.
This processing seems, with IE, to be done in the same thread as the one that is paused,
and without exiting all functions, nothing else can happen.
- Netscape Navigator has the captureEvents and handleEvent functions which could (presumably) be called
instead of or as well as the pause, but IE does not.
In IE the window.event object (or just event because window is the default)
exists only when an event occurs.
To e.g. implement a Stop button in IE, use window.open(...) to open a small window with just the Stop button,
and onclick set a flag in the caller.
- If there are no intrinsic window changes, this may have to be combined with a pause function such as that described above.
SLIP Serial Line IP (NOT an Internet Standard)
- simple framing for IP datagrams (level below IP).
Style
In HTML pages, the appearance (colour, font etc) of each kind of
tag can be set locally (for just the current tag), or internally for the whole document, or,
by using Cascading Style Sheets, externally for a number of HTML files.
e.g. <H5 STYLE="color:green">Just this is green</H5> displays
Just this is green
but <STYLE> H5{color:red; font:italic}</STYLE> ("H5" is the selector,
"color" is a property with value "red")
sets all (future and previous) H5 elements to red and italic (unless overriden by a local STYLE=). e.g.
<H5>H5 default</H5> displays
submitAllFormElements - as submitFormElements,
but data from disabled fields is also included in the URL.
This can be an advantage if, say, the HTML page calculates and displays a value which it would be inconvenient to
recalculate in the C++ code.