Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP using VBScript

Status
Not open for further replies.

EdRev

Programmer
Aug 29, 2000
510
US
I recently bought a book to learn ASP. I copied an ASP file from this book and tested it using MS Personal Web Server. The block of VBScript code didn't get executed. Is there any problem with this block of code:

<%@ LANGUAGE = &quot;VBScript&quot; %>
<html><head></head>
<body>
Today is <%= Now %>.
<% if Weekday(Now) = vbSaturday then
response.write &quot;Have a good weekend!&quot;
else
response.write &quot;Hang in there.....!&quot;
end if %>
</body></html>

The output was:

Today is.Have a good weekend!Hang in there......!

Please can anybody help this struggling novice.


 
I tried your code using the ASP script host/ VBScript engine on both IIS 5.0 in Windows 2000 and PWS in Windows 98 and it returned the correct results each time. The results are:

Today is 8/29/2000 9:46:58 PM. Hang in there.....!

I also slighly modified your code a bit and it worked equally as well, try this, maybe it will work.

<%@ LANGUAGE = VBScript%>
<html><head></head>
<body>
Today is <%= Now %>.
<% if Weekday(Now) = vbSaturday then%>
<%response.write &quot;Have a good weekend!&quot;%>
<%else%>
<%response.write &quot;Hang in there.....!&quot;%>
<%end if %>
</body></html>
 
Thanks ubsmith....

If that's the case, it might have something to do with the way PSW is set-up in my PC. When I installed it, I got these error messages:

&quot;An unknown error occurred while making MTS specific changes to the system registry

Error code = 0x80004005&quot;

&quot;Set up of 'Transaction Server Core Components' failed. The specific error code is 0x2ebe670&quot;

&quot;Set up will continue but the components may not run properly.&quot;

Do you have any insight on this?

Thanks again!!!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top