Of course, I am a newbie. I am taking over the web site of the Lemon Grass Restaurant. The owner wants to change few little things but I don't how to do it, although I have an idea.
Click the link below you will see the index.html of the site. It will stay there for 20 seconds, or soon as the title is clicked it then moves to the index2.html. Basically, the index.html has 2 simple parts: a logo and a text field.
<!-- m --><a class="postlink" href="http://www.lemongrassrest.com">http://www.lemongrassrest.com</a><!-- m -->
Before it moves to the index2.html, try to hit F5 to refresh the page, you will see the text field changes. Keep hitting F5, the text keep changing randomly. Looking at the code I can see how he did. Here is the codes (please note the codes in red):
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="description" content="Lemon Grass Restaurant - A beguiling colonial blend of French, Louisiana Creole and Asian flavors... The culinary equivalent of perfect pitch."">
<meta http-equiv="keywords" content="New Orleans, dining, restaurants, fine, best, Lemon Grass, Vietnamese, catering, banquets, chefs, Louisiana, Big Easy, Crescent City">
<meta http-equiv="Refresh" CONTENT="20;URL=http://www.lemongrassrest.com/index2.html">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<title>Lemon Grass Restaurant, New Orleans</title>
</head>
<body bgcolor="#FFFFFF" text="#1C5A00" link="#800000" vlink="#1C5A00" alink="#FFFFFF">
<p align="center"> </p>
<div align="center"><center>
<table border="0" width="428" cellspacing="0" cellpadding="25">
<tr>
<td width="100%" align="center"><a href=http://www.webdeveloper.com/forum/archive/index.php/"index2.html"><img src="images/logoflush.gif"
alt="Explore Lemon Grass, Wine and Dine Experience" border="0" width="428" height="125"></a></td>
</tr>
<tr>
<td width="100%" align="right"><div align="center"><center><table border="0" width="100%">
<tr>
<td width="100%" align="right"><font face="Arial, Helvetica" size="2" color="#3E683F"><script
LANGUAGE="JavaScript">
<!--
//Code by Mark Sottek. Ask before using please. <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e -->
quotes = new Array(8);
authors = new Array(8);
quotes[0] = "Lemon Grass feels like a respite from what we've come to perceive as the CBD- severe buildings- business suits- handshakes.";
authors[0] = "<I>New Orleans Magazine</I>, September 1999";
quotes[1] = "The space is light and refreshing, dreamy and <br>almost fantastic, much like the food.";
authors[1] = "Faith Dawson, <I>New Orleans Magazine</I>, September 1999";
quotes[2] = "Shrimp dumplings may not come to mind when you're pondering food choices in New Orleans. But chef Minh Bui's Lemon Grass Cafe is such a hit that he's opening a second place, Lemon Grass Restaurant, in the French Quarter.";
authors[2] = "<I>Food & Wine</I> Magazine, May 1999";
quotes[3] = "Friday Evening we try the Lemon Grass Cafe, a French-Vietnamese place that lives up to its reputation as one of the finest restaurants in town";
authors[3] = "<I>Departures</I> Magazine, Jan/Feb 1999";
quotes[4] = "A beguiling colonial blend of French, Louisiana Creole and Asian flavors... [T]he culinary equivalent of perfect pitch";
authors[4] = "<I>Travel & Leisure</I> Magazine, February 1999";
quotes[5] = "New Orleans isn't living in the past; it's new Creole establishments are at the forefront of American Dining...Don't overlook...the French-Vietnamese cuisine at Lemon Grass Cafe";
authors[5] = "<I>Food & Wine</I> Magazine, September 1998";
quotes[6] = "The first thing you'll notice different here is that where the traditional Vietnamese menu would list dishes by the hundred, the Lemon Grass has only a handful of offerings- about the same number as a nouvelle bistro... luscious...";
authors[6] = "Tom Fitzmorris, <I>City Business</I>, August 1996";
quotes[7] = "With all the comfort of a French cafe and all the exoticism of Vietnamese restaurant... Start your meal with one of the finest spring rolls we've encountered anywhere... You'll be amazed by the delicacy of the flavors...";
authors[7] = "<I>New Orleans Magazine</I>, September 1996";
index = Math.floor(Math.random() * quotes.length);
document.write("<DL>\n");
document.write("<DT>" + "\"" + quotes[index] + "\"\n");
document.write("<DD><SMALL>" + "<br>-- " + authors[index] + "\n");
document.write("</DL>\n");
//done -->
</script></font></td>
</tr>
</table>
</center></div></td>
</tr>
</table>
</center></div>
</body>
</html>
Now the owner wants: upon the site is activated, the index.html displays as before, then the text will refreshes randomly every 5 seconds until a full minute or soon as the title is clicked.
What I did was change the refresh statement from:
<meta http-equiv="Refresh" CONTENT="20;URL=http://www.lemongrassrest.com/index2.html">
to:
<meta http-equiv="Refresh" CONTENT="5;URL=http://www.lemongrassrest.com/index.html">
This would almost does the trick, but just almost 'cause: firstly, it would not move to index2.html in 1 full minute; secondly, he does not like the way it refreshes because the logo also refreshes that make it flicking (he said that is less elegant.)
My next idea is like below, but I don't the syntax and I don't know if there were a wait() function:
while (true) do {
index = Math.floor(Math.random() * quotes.length);
document.write("<DL>\n");
document.write("<DT><NORMAL>" + "\"" + quotes[index] + "\"\n");
document.write("<DD><SMALL>" + "<br>-- " + authors[index] + "\n");
document.write("</DL>\n");
wait(5 seconds);
blank the field;
}
I appreciate someone please help me. ngungo
.
Click the link below you will see the index.html of the site. It will stay there for 20 seconds, or soon as the title is clicked it then moves to the index2.html. Basically, the index.html has 2 simple parts: a logo and a text field.
<!-- m --><a class="postlink" href="http://www.lemongrassrest.com">http://www.lemongrassrest.com</a><!-- m -->
Before it moves to the index2.html, try to hit F5 to refresh the page, you will see the text field changes. Keep hitting F5, the text keep changing randomly. Looking at the code I can see how he did. Here is the codes (please note the codes in red):
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="description" content="Lemon Grass Restaurant - A beguiling colonial blend of French, Louisiana Creole and Asian flavors... The culinary equivalent of perfect pitch."">
<meta http-equiv="keywords" content="New Orleans, dining, restaurants, fine, best, Lemon Grass, Vietnamese, catering, banquets, chefs, Louisiana, Big Easy, Crescent City">
<meta http-equiv="Refresh" CONTENT="20;URL=http://www.lemongrassrest.com/index2.html">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<title>Lemon Grass Restaurant, New Orleans</title>
</head>
<body bgcolor="#FFFFFF" text="#1C5A00" link="#800000" vlink="#1C5A00" alink="#FFFFFF">
<p align="center"> </p>
<div align="center"><center>
<table border="0" width="428" cellspacing="0" cellpadding="25">
<tr>
<td width="100%" align="center"><a href=http://www.webdeveloper.com/forum/archive/index.php/"index2.html"><img src="images/logoflush.gif"
alt="Explore Lemon Grass, Wine and Dine Experience" border="0" width="428" height="125"></a></td>
</tr>
<tr>
<td width="100%" align="right"><div align="center"><center><table border="0" width="100%">
<tr>
<td width="100%" align="right"><font face="Arial, Helvetica" size="2" color="#3E683F"><script
LANGUAGE="JavaScript">
<!--
//Code by Mark Sottek. Ask before using please. <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e -->
quotes = new Array(8);
authors = new Array(8);
quotes[0] = "Lemon Grass feels like a respite from what we've come to perceive as the CBD- severe buildings- business suits- handshakes.";
authors[0] = "<I>New Orleans Magazine</I>, September 1999";
quotes[1] = "The space is light and refreshing, dreamy and <br>almost fantastic, much like the food.";
authors[1] = "Faith Dawson, <I>New Orleans Magazine</I>, September 1999";
quotes[2] = "Shrimp dumplings may not come to mind when you're pondering food choices in New Orleans. But chef Minh Bui's Lemon Grass Cafe is such a hit that he's opening a second place, Lemon Grass Restaurant, in the French Quarter.";
authors[2] = "<I>Food & Wine</I> Magazine, May 1999";
quotes[3] = "Friday Evening we try the Lemon Grass Cafe, a French-Vietnamese place that lives up to its reputation as one of the finest restaurants in town";
authors[3] = "<I>Departures</I> Magazine, Jan/Feb 1999";
quotes[4] = "A beguiling colonial blend of French, Louisiana Creole and Asian flavors... [T]he culinary equivalent of perfect pitch";
authors[4] = "<I>Travel & Leisure</I> Magazine, February 1999";
quotes[5] = "New Orleans isn't living in the past; it's new Creole establishments are at the forefront of American Dining...Don't overlook...the French-Vietnamese cuisine at Lemon Grass Cafe";
authors[5] = "<I>Food & Wine</I> Magazine, September 1998";
quotes[6] = "The first thing you'll notice different here is that where the traditional Vietnamese menu would list dishes by the hundred, the Lemon Grass has only a handful of offerings- about the same number as a nouvelle bistro... luscious...";
authors[6] = "Tom Fitzmorris, <I>City Business</I>, August 1996";
quotes[7] = "With all the comfort of a French cafe and all the exoticism of Vietnamese restaurant... Start your meal with one of the finest spring rolls we've encountered anywhere... You'll be amazed by the delicacy of the flavors...";
authors[7] = "<I>New Orleans Magazine</I>, September 1996";
index = Math.floor(Math.random() * quotes.length);
document.write("<DL>\n");
document.write("<DT>" + "\"" + quotes[index] + "\"\n");
document.write("<DD><SMALL>" + "<br>-- " + authors[index] + "\n");
document.write("</DL>\n");
//done -->
</script></font></td>
</tr>
</table>
</center></div></td>
</tr>
</table>
</center></div>
</body>
</html>
Now the owner wants: upon the site is activated, the index.html displays as before, then the text will refreshes randomly every 5 seconds until a full minute or soon as the title is clicked.
What I did was change the refresh statement from:
<meta http-equiv="Refresh" CONTENT="20;URL=http://www.lemongrassrest.com/index2.html">
to:
<meta http-equiv="Refresh" CONTENT="5;URL=http://www.lemongrassrest.com/index.html">
This would almost does the trick, but just almost 'cause: firstly, it would not move to index2.html in 1 full minute; secondly, he does not like the way it refreshes because the logo also refreshes that make it flicking (he said that is less elegant.)
My next idea is like below, but I don't the syntax and I don't know if there were a wait() function:
while (true) do {
index = Math.floor(Math.random() * quotes.length);
document.write("<DL>\n");
document.write("<DT><NORMAL>" + "\"" + quotes[index] + "\"\n");
document.write("<DD><SMALL>" + "<br>-- " + authors[index] + "\n");
document.write("</DL>\n");
wait(5 seconds);
blank the field;
}
I appreciate someone please help me. ngungo
.