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!

Basic VBscript question

Status
Not open for further replies.

Yazster

Programmer
Sep 20, 2000
175
CA
I'm new to VBscript, and I have a question concerning the DOCUMENT.WRITELN command.

According to a few books I've seen, this command should display messages to the current document, but everytime I use it, it always blanks my screen and displays it on a new blank document.

Any ideas?

Thanks,
Yazster
[sig][/sig]
 
i think document.writeln is java script syntex [sig][/sig]
 
response.write
is what you need for VBScript.

this is what I use when I create new .ASP page as and am passing arguments to the page.

<html>
<%@ Language=VBScript %>
<head>
<title>Parts Search Results</title>
</head>
<body>
<%pnum=request.querystring(&quot;PartNumber&quot;)
Response.Write &quot;Part: &quot; & pnum%>
</body>
</html>

----------------
In my example above I have a text box on a form called PartNumber and when I press the submit button on the page calling this one it passes ?PartNumber=12345 in the URL
This page takes PartNumber and puts it in pnum with the request.querystring line and then Response.Write prints it out.

OK
Note you must have the script inside <% %> commands or the browser will think its HTML and just print it on the page.
[sig]<p>DougP, MCP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top