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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

About the 'Response' object.

Status
Not open for further replies.

Robbart

Programmer
Aug 5, 2001
3
SE
Hi!

I'm a true newbie to ASP, just bought a book etc. etc.

Finally when I was to write my first piece of VBScript code, i.e:

<SCRIPT Language=VBScript RUNAT=Server>

Response.Write &quot;Hello world!&quot;

</SCRIPT>

...I get errormsg: &quot;Object required: 'Response'&quot;
..why?

I'm running Win98 using 'Personal Web Server'.

Any replies are appreciated!

Regards.
/Robert

PS: I usually code in C++, so you needn't bother about describing &quot;what an object is&quot; etc. Thanks.
 
All ASP code must be surrounded with <% and %> tags...



<% Response.Write &quot;Hello world!&quot; %>


should give result....

br
Gerard
 
Well, it didn't give results, but at least there was no error. Nothing happened though.

Regards.
/Robert
 
TEST.ASP:

<%
Response.Write &quot;Hello world!&quot;
%>


this really should give a result!
br
Gerard
 
aah! *Stupid*
I forgot to name the file .asp. I named it .htm.

stupid....

thanks anyway!

/Robert
 
LOL

again: 1 problem down, next please. br
Gerard
 
By the way, you do not use <% %> around script that is already inside a <Script> blocks. <% %> is only for script embedded in HTML. As coded, it is just fine.
<SCRIPT Language=VBScript RUNAT=Server>

Response.Write &quot;Hello world!&quot;

</SCRIPT>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top