February 14, 2000 - Creating A Banner
February 14, 2000 Creating A Banner Tips: February 2000
Yehuda Shiran, Ph.D.
|
where
SPAN
element must be placed in absolute positions. Notice the STYLE attribute of our SPAN
element:
<SPAN ID="banner" STYLE="position: absolute;"><I>the banner is loading</I></SPAN>
onload = start;
start()
is the following function:
function start() {
display("banner", "Navigator behaves totally differently from Explorer");
}
with (document[id].document) {
open();
write(str);
close();
}
Again, I cannot stress enough how much the above topics are impoartant. Here is a banner script. Try to omit some features and observe its consequences.
<HTML>
<HEAD>
<TITLE>Title Here</TITLE>
<SCRIPT LANGUAGE="JavaScript1.2">
<!--
var NS4 = (document.layers) ? 1 : 0;
var IE4 = (document.all) ? 1 : 0;
onload = start;
function start() {
display("banner", "Navigator behaves totally differently from Explorer");
}
function display(id, str) {
if (NS4) {
with (document[id].document) {
open();
write(str);
close();
}
} else {
document.all[id].innerHTML = str;
}
}
// -->
</SCRIPT>
</HEAD>
<BODY>
<SPAN ID="banner" STYLE="position: absolute;"><I>the banner is loading</I></SPAN><BR><BR>
</BODY>
</HTML>
Learn more about text banners in Column 3, Rotating Text Banners.