/    Sign up×
Community /Pin to ProfileBookmark

Please help me with this!

I need help with this particular page. It is supposed to display the daily dish and is not doing so. I have debugged it and now there is nothing left to debug, Any help would be appreciated!!!

<html>
<head>
<title>Kelsey’s Dinner Menu</title>

<style>
body {background-image:url(tan.jpg)}
h3 {color:blue}
dt {font-weight:bold; color:green}
</style>

</head>

<body>
<center><img src=”dinner.jpg”>
<h5><span style=”font-size:x-large; color:green”>
Dinner Menu</span><br>
Served 4:00 p.m. – 10:00 p.m.</h5><hr></center>
<dl>
<h3>Today’s Special</h3>

<dt>
<script language=”JavaScript”>
<!— Start hiding from non-JavaScript browser
//Insert the titles of the nightly specials below
function Dishname(Day) {
var Dname=dishname.getdishname();
var today=CurrentDate();
var weekday=today.getdate();
document.write(“today is “+weekday+” “+dishname+”<br>”);
}
function Dname (dishname) {
var Day=new Array(7);
Dname[0]=”Chicken Burrito Amigo”;
Dname[1]=”Chicken Tarjine”;
Dname[2]=”Pizza Bella”;
Dname[3]=”Salmon Filet”;
Dname[4]=”Greek Style Shrimp”;
Dname[5]=”All you can eat Fish”;
Dname[6]=”Prime Rib”;
return Dname[Day];
}

//Stop hiding –>
</script>

<dd>
<script language=”JavaScript”>
<!— Start hiding from non-JavaScript browser
//Insert the descriptions of the nightly specials below
function Dishdesc(Day) {
var Ddesc=Dishdesc.getdishdesc();
var today=CurrentDate();
var weekday=today.getdate();
document.write(“today is “+weekday+” “+dishdesc+”<br>”);
}
function Ddesc (Dishdesc) {
var Day=new Array(7);
Ddesc[0]=”chicken with mushrooms, onions, and jack cheese wrapped in a tortilla. 9.95″;
Ddesc[1]=”chicken baked with garlic,olives,capers,and prunes 8.95″;
Ddesc[2]=”large pizza with pesto,goat cheese,onions and motzeralla cheese 8.95″;
Ddesc[3]=”grilled salmon with curry sauce and baked potato 9.95″;
Ddesc[4]=”shrimp,feta cheese, and tomatoes simmered in basil and garlic 9.95″;
Ddesc[5]=”deep fried cod and baked potato and rolls 9.95″;
Ddesc[6]=”12 oz cut with baked potato rolls and dinner salad 12.95″;
return Ddesc[Day];
}

//Stop hiding –>
</script>

<dt><hr>Cajun Meatloaf
<dd>Lean beef served with Kelsey’s Southwestern mashed potatoes. 8.95
<dt>Chicken Marsala
<dd>Plump chicken breasts sauteed with tomatoes, mushrooms, & artichoke hearts
with a splash of Marsala wine. 8.95
<dt>Pecan Crusted Whitefish
<dd>Quickly seared fish & fresh mushrooms served with pineapple chutney. 10.95
<dt>Thai Stir Fry
<dd>Fresh crisp vegetables quickly sauteed, tossed with Kelsey’s spicy
peanut sauce, served over rice. 8.95
<dt>Jambalaya
<dd>Plump shrimp, chicken, & spicy sausage slowly simmered with tomatoes and
rice. 9.95
<dt>Wild Rice Stuffed Squash
<dd>Winter squash stuffed with fresh harvest vegetables & pecan rice, served
with pineapple chutney & melted Monterey Jack. 8.95
<dt>Cuban Beans & Rice
<dd>Black turtle beans simmered with carrots, tomatoes, & green peppers,
served over rice with spicy salsa, guacamole, & flour tortillas. 7.95
</dl>
</body>

</html>

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@requestcodeApr 02.2003 — You have several problems, one is that you are using some variable more than once which will cause the script not to work. You also do not have the Date() constructed correctly. Here is your script re-worked:

<script language="JavaScript">

var Dname=new Array();

Dname[0]="Chicken Burrito Amigo";

Dname[1]="Chicken Tarjine";

Dname[2]="Pizza Bella";

Dname[3]="Salmon Filet";

Dname[4]="Greek Style Shrimp";

Dname[5]="All you can eat Fish";

Dname[6]="Prime Rib";

var dayofweek=new Array()

dayofweek[0]="Sunday"

dayofweek[1]="Monday"

dayofweek[2]="Tuesday"

dayofweek[3]="Wednesday"

dayofweek[4]="Thursday"

dayofweek[5]="Friday"

dayofweek[6]="Saturday"

var today=new Date();

var dayof=today.getDay()-1

document.write("Today is "+dayofweek[dayof]+" and "+Dname[dayof]+" is our special!<br>");


</script>

This works, but maybe not exactly the way you want it. It should give you an idea of how correcty yours. Good Luck.
Copy linkTweet thisAlerts:
@JasQauthorApr 02.2003 — Thank you request code. As I see more and more of this, I can pick it up rather quickly. Your help was much appreciated. Where would you recommend ( website) that I could go to further educate myself on JavaScripting? I am fairly proficient in html.
Copy linkTweet thisAlerts:
@requestcodeApr 02.2003 — These two sites helped me when I was first learning:

http://www.htmlgoodies.com

http://www.javascriptkit.com
Copy linkTweet thisAlerts:
@JasQauthorApr 02.2003 — Great! Thanks alot.
×

Success!

Help @JasQ spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...