Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
I need some help writing code in vbscript?
Hello, I've been trying to code vbscript, and I can never get the code to work.
Say I type in
<script type="text/vbscript">
document.write("No semicolons")
document.write(" were injured in the making")
document.write(" of this tutorial!")
</script>
According to tons of websites i've been on, this should work, and display
"No semicolons we're hurt in the making of this tutorial"
However, when I use this code, or any other code from other websites,
I always get a compilation error that seems to happen on line 1 at character 1.
If anyone knows what I'm doing wrong, any help would be greatly appreciated.
1 Answer
- 8 years agoFavorite Answer
If you are creating an ASP page, which I'm sure you are you just need <% to insert Code %>..
Also Document.Write is a Javascript method, use:
<%
Response.Write("No Semicolons")
Response.Write(" were injured in the making")
Response.Write(" of this tutorial!")
%>
Also make sure you place this code in the body not the head section of your HTML. Cheers.