• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 175
  • Last Modified:

Why is this web page not displaying the vriable

<html>
<head>
<meta name="generator" content="Alpha Five HTML Editor">
<title>Creating and Using Variables</title>
</head>
<body>
<p>
<%a5
dim nSpeed as N
dim nHours as N
dim nMiles as N
nSpeed = 40
nHours = 2
nMiles = nSpeed * nHours
? "The milenAge is " + nMiles
%>
</p>
</body>
</html>


When the web page is displayed in the web page it is blank. It should display this information "The milenAge is 80" but yet the page is blank. using IE
0
Dell12805
Asked:
Dell12805
  • 2
  • 2
3 Solutions
 
geowrianCommented:
How are you running the page? It looks like you are using Classic ASP, not just HTML. If so, the page should be named my_page_name.asp, then uploaded to the IIS webserver. Also, a slight fix to your code:

<html>
<head>
<meta name="generator" content="Alpha Five HTML Editor">
<title>Creating and Using Variables</title>
</head>
<body>
<p>
<%
dim nSpeed
dim nHours
dim nMiles
nSpeed = 40
nHours = 2
nMiles = nSpeed * nHours
Response.Write "The milenAge is " + nMiles
%>
</p>
</body>
</html>

Open in new window

0
 
torimarCommented:
The passage between "<%"  and "%>" is written in ASP which needs to be interpreted by a server, so the web browser has nothing to display.
It looks like you are following a tutorial of some kind. Read the beginning, they should tell you how to configure your Windows computer so it runs a webserver that will be able to interpret and serve your file. In case the tutorial doesn't give that kind of advice, please consult this page:
http://www.stardeveloper.com/articles/display.html?article=2000041601&page=1
0
 
Dell12805Author Commented:
Thanks guys
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now