Hello:
I am a newbie to learning Javascript. I have some problems with a file.
The title of the file is: "Crawling With Date, Time and Message".
The goal of the file is that when it loads in a browser, the 1st image is displayed in the top left
(image 7441805.gif), along with the following three titles to the right of the image, as listed below:
Java Demystified
OOP Demystified
Data Structures Demystified
When you place the cursor over any one of the three titles, you get the appropriate pop-out to appear.
However, another desired feature is to have the current date and time to be incorporated into the
crawl message in the bottom status bar, which only works in the Opera browser.
Unfortunately, it doesn't work in IE9 or Mozilla (no status bars shows up at all).
I would appreciate the help.
Thanks.
I am a newbie to learning Javascript. I have some problems with a file.
The title of the file is: "Crawling With Date, Time and Message".
The goal of the file is that when it loads in a browser, the 1st image is displayed in the top left
(image 7441805.gif), along with the following three titles to the right of the image, as listed below:
Java Demystified
OOP Demystified
Data Structures Demystified
When you place the cursor over any one of the three titles, you get the appropriate pop-out to appear.
However, another desired feature is to have the current date and time to be incorporated into the
crawl message in the bottom status bar, which only works in the Opera browser.
Unfortunately, it doesn't work in IE9 or Mozilla (no status bars shows up at all).
I would appreciate the help.
Thanks.
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">[/URL]
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml"[/URL] lang="en" xml:lang="en">
<head>
<title>Crawling With Date, Time and Message</title>
<meta http-equiv="Content-type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Language" content="en-us" />
<meta name="description" content="Wealthy List" />
<meta name="keywords" content="Wealthy List" />
<!-- the absolute pathname of this file is: -->
<!-- C:\MISCSUP2_10_17_8\MISCSUP2\Javascript_Demystified_Download_Working\ -->
<!-- Ch_13_Page266.html -->
<!-- *********************************************************** -->
<!-- THIS FILE DOESN'T WORK RIGHT in Mozilla and IE9, but it works -->
<!-- perfectly in Opera -->
<!-- *********************************************************** -->
<!-- this file was created on Thursday, 9/15/11: -->
<!-- this file was updated on Thursday, 9/15/11: -->
<script language="Javascript" type="text/javascript">
<!--
var Mesg
var CurrentTime
var Count = 0
function SetMessage() {
Today = new Date()
CurrentTime = Today.toString()
Mesg = '.....Trade secrets are revealed in the Demystified Series......'+ CurrentTime
}
function Crawl() {
SetMessage()
window.status = Mesg.substring(Count, Mesg.length) + Mesg.substring(0, Count)
if (Count < Mesg.length) {
Count++
} else {
Count = 0
}
setTimeout("Crawl()",200)
}
function OpenNewWindow(book) {
if (book== 1)
{
document.cover.src='7441805.gif'
MyWindow = window.open('', 'myAdWin', 'titlebar=0 status=0, toolbar=0, location=0, menubar=0, directories=0, resizable=0, height=50, width=150,left=500,top=400')
MyWindow.document.write('10% Discount for Java Demystified!')
}
if (book== 2)
{
document.cover.src='0072253630.jpg'
MyWindow = window.open('', 'myAdWin', 'titlebar=0 status=0, toolbar=0, location=0, menubar=0, directories=0, resizable=0, height=50, width=150,left=500,top=500')
MyWindow.document.write('20% Discount for OOP Demystified!')
}
if (book== 3)
{
document.cover.src='7417436.gif'
MyWindow = window.open('', 'myAdWin', 'titlebar=0 status=0, toolbar=0, location=0, menubar=0, directories=0, resizable=0, height=50, width=150,left=500,top=600')
MyWindow.document.write('15% Discount for Data Structures Demystified!')
}
}
-->
</script>
</head>
<body onload="Crawl()">
<table width="100%" border=0>
<tbody>
<tr valign=top>
<td width=50>
<a>
<img height=92 src="7441805.gif" width=70 border=0 name='cover'>
</a>
</td>
<td>
<img height=1 src="" width=10>
</td>
<td>
<a onmouseover="OpenNewWindow(1)" onmouseout="MyWindow.close()">
<b><u>Java Demystified </u></b>
</a>
<br>
<a onmouseover="OpenNewWindow(2)" onmouseout="MyWindow.close()">
<b><u>OOP Demystified</u></b>
</a>
<br>
<a onmouseover="OpenNewWindow(3)" onmouseout="MyWindow.close()">
<b><u>Data Structures Demystified</u></b>
</a>
</td>
</tr>
</tbody>
</table>
</body>
</html>