The object tag is explained in the main CodeHelp site. Note that the tag is not currently supported by WebTV or Opera but is supported fully by Microsoft Internet Explorer (v2 and later). Netscape (v2 onwards) supports the tag for some applications but not for HTML. See the information on the <layer> tag in the CodeHelp site.
<object classid="URL" codebase="URL" data="URL"
type="mime-type" id="name">
When using <object> to replace the deprecated <applet> tag for Java applets, the <param> tag can be used as normal within the <object> and </object> tags.
Top
A placeholder for a Javascript function - to be run only once after all the components of the page have completely finished loading.
Javascript code can be contained in a function declaration, executed on command, or simply listed in the <script> tag - called inline. Inline code executes as soon as the browser gets to that part of the document and whereas this can be useful for changing the content of the page at that point, if the code needs to change anything elsewhere in the document, inline code will cause apparently random errors. This is because the code is executed in strict sequence according to it's position in the HTML text file. It is quite likely that - due to the way documents are transmitted over the net - some parts of the document will not have reached the browser before the code executes, causing errors. To avoid this, use the onload attribute to force the code to wait until every part of the document has been processed before executing the code automatically. The attribute is added to the <body> tag and takes a single value, the name of the Javascript function to execute.
<body onload="startcode();">
Top
One common Javascript function is to open a new window, complete with scrollbars and toolbars if required, with a selected file already displayed. This window acts independently of the first window, with it's own history and location objects. The Javascript syntax is:
window.open("URL","toolbar=no, width=350, height=400, status=no,scrollbars=yes, resize=yes, menubar=yes");
Top
Part of a select element, see input
tags for HTML syntax.
<select ID="inputselect" size="3">
<option value="chosen1">option1</option>
<option value="chosen2">option2</option>
<option value="chosen3">option3</option>
<option value="chosen4">option4</option>
</select>
document.demo.inputselect.options[0].defaultSelected;
document.demo.inputselect.options[0].index;
document.demo.inputselect.options[0].selected;
document.demo.inputselect.options[0].text;
document.demo.inputselect.options[0].value;
If you use a fixed size in a style sheet to create an area around content, there is a
method for dictating how any overflow is handled. Use overflow:visible to extend the area to contain
everything, despite the fixed size, use overflow:hidden to crop the content - even if this means that the
last line is unreadable - or use overflow:scroll to keep the fixed size and add a scrollbar to allow the
rest of the content to be seen.
<p style="position:relative; width:200px; height:100px; overflow:visible">
</p>
Note that Netscape4 may not display overflows correctly.
Top