Cannot access server variables on client

T

Tim Regan

Hi Folks,

This page of asp should (I think) generate a page that reads:

Firstly
Secondly
Thirdly
Fourthly
Fifthly

But it doesn't: the first two lines are swapped and the fifth line is
missing. How should I change it so that it worked?

Thanks,

Tim.

PS Actually a fix for either problem would do.

PPS Here's the ASP:

<html>
<head>
<script language="javascript" runat="server">
var thirdString = "Thirdly<br>";
var fifthString = "Fifthly<br>";
</script>
</head>
<body>
Firstly <br>
<script language="javascript" runat="server">
response.write("Secondly<br>");
</script>
<%=thirdString%>
<script language="javascript">
var clientFourthString = "Fourthly<br>";
document.write(clientFourthString);
</script>
<script language="javascript">
var clientFifthString = <%=fifthString%>;
document.write(clientString);
</script>
</body>
</html>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,159
Messages
2,570,879
Members
47,414
Latest member
GayleWedel

Latest Threads

Top